diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-22 13:47:37 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-22 13:47:37 +0200 |
commit | 004b3178761fb4e5f954049194751d1fb7f512c0 (patch) | |
tree | 138f41a8d80ee502ecc669403778a4094fe0b4d8 /phpBB/cron.php | |
parent | ff280d3f466dcb139af98b027317291e4ca45b2f (diff) | |
download | forums-004b3178761fb4e5f954049194751d1fb7f512c0.tar forums-004b3178761fb4e5f954049194751d1fb7f512c0.tar.gz forums-004b3178761fb4e5f954049194751d1fb7f512c0.tar.bz2 forums-004b3178761fb4e5f954049194751d1fb7f512c0.tar.xz forums-004b3178761fb4e5f954049194751d1fb7f512c0.zip |
[ticket/12576] Retrieve the cron_manager in cron.php if needed
PHPBB3-12576
Diffstat (limited to 'phpBB/cron.php')
-rw-r--r-- | phpBB/cron.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php index 787183f689..f63642faa2 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -59,11 +59,7 @@ function do_cron($cron_lock, $run_tasks) // // If DEBUG is defined and cron lock cannot be obtained, a message will be printed. -if ($config['use_system_cron']) -{ - $cron = $phpbb_container->get('cron.manager'); -} -else +if (!$config['use_system_cron']) { $cron_type = request_var('cron_type', ''); @@ -74,6 +70,8 @@ else $cron_lock = $phpbb_container->get('cron.lock_db'); if ($cron_lock->acquire()) { + $cron = $phpbb_container->get('cron.manager'); + if ($config['use_system_cron']) { $run_tasks = $cron->find_all_ready_tasks(); |