aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2014-05-24 11:55:34 +0200
committerAndreas Fischer <bantu@phpbb.com>2014-05-24 11:55:34 +0200
commit219d8a41dc110f95f7035a25459b5374060a6443 (patch)
tree6bdbf24ad45bbc92bb99502004ae731eabaf44c1 /phpBB/includes/functions.php
parentd01c947132e07b3927492ccdda1c7d7b1fdee98d (diff)
parent42bc2612c45a40b2be8940fe3b6b9813e8bed9cb (diff)
downloadforums-219d8a41dc110f95f7035a25459b5374060a6443.tar
forums-219d8a41dc110f95f7035a25459b5374060a6443.tar.gz
forums-219d8a41dc110f95f7035a25459b5374060a6443.tar.bz2
forums-219d8a41dc110f95f7035a25459b5374060a6443.tar.xz
forums-219d8a41dc110f95f7035a25459b5374060a6443.zip
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12585] Use a 5 minutes interval instead of 10 minutes [ticket/12585] Don't check the cron on each page load
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index adb6e1a0a0..d613c87728 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();
@@ -5125,6 +5125,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, 300);
+ }
}
if ($display_template)