aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 6d67f87096..f18514096f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4284,8 +4284,27 @@ function page_footer($run_cron = true)
);
// Call cron-type script
+ $call_cron = false;
if (!defined('IN_CRON') && $run_cron && !$config['board_disable'])
{
+ $call_cron = true;
+
+ // Any old lock present?
+ if (!empty($config['cron_lock']))
+ {
+ $cron_time = explode(' ', $config['cron_lock']);
+
+ // If 1 hour lock is present we do not call cron.php
+ if ($cron_time[0] + 3600 >= time())
+ {
+ $call_cron = false;
+ }
+ }
+ }
+
+ // Call cron job?
+ if ($call_cron)
+ {
$cron_type = '';
if (time() - $config['queue_interval'] > $config['last_queue_run'] && !defined('IN_ADMIN') && file_exists($phpbb_root_path . 'cache/queue.' . $phpEx))