diff options
Diffstat (limited to 'lib/models/resources/GlobalResourceLock.class.php')
| -rw-r--r-- | lib/models/resources/GlobalResourceLock.class.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/models/resources/GlobalResourceLock.class.php b/lib/models/resources/GlobalResourceLock.class.php index 541cc0f..8b0d01b 100644 --- a/lib/models/resources/GlobalResourceLock.class.php +++ b/lib/models/resources/GlobalResourceLock.class.php @@ -28,13 +28,13 @@ class GlobalResourceLock extends SimpleORMap { protected static $defined_types = []; - + public function __construct($id = null) { self::initDefinedTypes(); parent::__construct($id); } - + protected static function initDefinedTypes() { if (empty(self::$defined_types)) { @@ -45,14 +45,14 @@ class GlobalResourceLock extends SimpleORMap ]; } } - + protected static function configure($config = []) { $config['db_table'] = 'global_resource_locks'; - + parent::configure($config); } - + public static function isLocked($begin, $end) { return self::countBySql('begin < :end AND end > :begin', compact('begin', 'end')) > 0; @@ -68,7 +68,7 @@ class GlobalResourceLock extends SimpleORMap self::initDefinedTypes(); return self::$defined_types; } - + /** * Returns a string representation of the type of this resource lock. * |
