From a1384605c7408613c5b5cfb79fdb0089823c316c Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 11 Jan 2012 14:04:09 +0000 Subject: [PATCH] MDL-26469 upgrade: module cron setting not updated. --- lib/upgradelib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/upgradelib.php b/lib/upgradelib.php index a6c0797330c8b..d8605b8080d67 100644 --- a/lib/upgradelib.php +++ b/lib/upgradelib.php @@ -506,7 +506,7 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) { require_once("$fullmod/db/install.php"); // Set installation running flag, we need to recover after exception or error set_config('installrunning', 1, $module->name); - $post_install_function = 'xmldb_'.$module->name.'_install';; + $post_install_function = 'xmldb_'.$module->name.'_install'; $post_install_function(); unset_config('installrunning', $module->name); } @@ -540,7 +540,12 @@ function upgrade_plugins_modules($startcallback, $endcallback, $verbose) { upgrade_mod_savepoint($result, $module->version, $mod, false); } - /// Upgrade various components + // update cron flag if needed + if ($currmodule->cron != $module->cron) { + $DB->set_field('modules', 'cron', $module->cron, array('name' => $module->name)); + } + + // Upgrade various components update_capabilities($component); log_update_descriptions($component); external_update_descriptions($component);