Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

MDL-37943 upgrade: logic error in upgrade_plugins_blocks.

Derek Woolhead tracked down the problem and what needed to be fixed. I
just made the patch.

The problem was that if $plugin->cron had changed in version.php, then
the version number in the database could end up wrong after the upgrade,
and so the upgrade would immediately run a second time.
  • Loading branch information...
commit 5baa26c105f7280077bdd536e66fc28865bdafec 1 parent 0e6d8bc
@timhunt timhunt authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/upgradelib.php
3  lib/upgradelib.php
@@ -823,8 +823,7 @@ function upgrade_plugins_blocks($startcallback, $endcallback, $verbose) {
if ($currblock->cron != $block->cron) {
// update cron flag if needed
- $currblock->cron = $block->cron;
- $DB->update_record('block', $currblock);
+ $DB->set_field('block', 'cron', $block->cron, array('id' => $currblock->id));
// Upgrade various components
Please sign in to comment.
Something went wrong with that request. Please try again.