diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/cron.php | 4 | ||||
-rw-r--r-- | phpBB/includes/lock/db.php | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php index fb85e9fe18..e179b3e8d6 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -48,7 +48,7 @@ function do_cron($cron_lock, $run_tasks) } // Unloading cache and closing db after having done the dirty work. - $cron_lock->unlock(); + $cron_lock->release(); garbage_collection(); } @@ -74,7 +74,7 @@ else } $cron_lock = new phpbb_lock_db('cron_lock', $config, $db); -if ($cron_lock->lock()) +if ($cron_lock->acquire()) { if ($config['use_system_cron']) { diff --git a/phpBB/includes/lock/db.php b/phpBB/includes/lock/db.php index 092f4f9789..f5f1b4c6f9 100644 --- a/phpBB/includes/lock/db.php +++ b/phpBB/includes/lock/db.php @@ -80,11 +80,11 @@ class phpbb_lock_db * @return bool true if lock was acquired * false otherwise */ - public function lock() + public function acquire() { if ($this->locked) { - return true; + return false; } if (!isset($this->config[$this->config_name])) @@ -119,15 +119,15 @@ class phpbb_lock_db /** * Releases the lock. * - * The lock must have been previously obtained, that is, lock() call + * The lock must have been previously obtained, that is, acquire() call * was issued and returned true. * * Note: Attempting to release a lock that is already released, - * that is, calling unlock() multiple times, is harmless. + * that is, calling release() multiple times, is harmless. * * @return void */ - public function unlock() + public function release() { if ($this->locked) { |