summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-24 17:28:10 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-24 17:28:10 +0000
commit8c390590d970b76c8c69fed07d1b88d1bd84612d (patch)
treee6a422bd7065070397d0b5ba36bc63529d9e757a /modules/system/system.module
parent2d9fd20acc7c9e668c0f04e1486771227205a41e (diff)
downloadbrdo-8c390590d970b76c8c69fed07d1b88d1bd84612d.tar.gz
brdo-8c390590d970b76c8c69fed07d1b88d1bd84612d.tar.bz2
#833094 by carlos8f, David_Rothstein: Fixed Ajax requests in installer cause cron to run prematurely.
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index d8ad21f16..23d218af2 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -3283,7 +3283,10 @@ function system_page_alter(&$page) {
* Run the automated cron if enabled.
*/
function system_run_automated_cron() {
- if (($threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) > 0) {
+ // If the site is not fully installed, suppress the automated cron run.
+ // Otherwise it could be triggered prematurely by AJAX requests during
+ // installation.
+ if (($threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) > 0 && variable_get('install_task') == 'done') {
$cron_last = variable_get('cron_last', NULL);
if (!isset($cron_last) || (REQUEST_TIME - $cron_last > $threshold)) {
drupal_cron_run();