diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-22 22:34:03 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-22 22:34:03 +0200 |
commit | c83b5688485e4aa460e8d4c234b548a259c8866c (patch) | |
tree | 8c1aee271c94b3c5c75e10cccd6a85dfb7d9ac93 | |
parent | a2cd9c2464b2f83ec005831955d2f027c9c0210a (diff) | |
download | forums-c83b5688485e4aa460e8d4c234b548a259c8866c.tar forums-c83b5688485e4aa460e8d4c234b548a259c8866c.tar.gz forums-c83b5688485e4aa460e8d4c234b548a259c8866c.tar.bz2 forums-c83b5688485e4aa460e8d4c234b548a259c8866c.tar.xz forums-c83b5688485e4aa460e8d4c234b548a259c8866c.zip |
[ticket/12585] Don't check the cron on each page load
PHPBB3-12585
-rw-r--r-- | phpBB/includes/functions.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 49568bb1b2..84a630103b 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5095,7 +5095,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = // Call cron-type script $call_cron = false; - if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot']) + if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check')) { $call_cron = true; $time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time(); @@ -5124,6 +5124,10 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = $url = $task->get_url(); $template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />'); } + else + { + $cache->put('cron.lock_check', true, 60 * 10); + } } if ($display_template) |