diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index bf34bea603..75d181cfcc 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -203,6 +203,7 @@
[Fix] Only show "Add friend" and "Add foe" links if the specific module is enabled. (Bug #50475)
[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)
[Fix] Fix handling of bookmarks and subscriptions on "split topcis", "merge topics" and "merge posts". (Bug #50035)
+ [Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)
[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).
[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
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,7 +4284,26 @@ 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 = '';