From: Tim Hunt Date: Wed, 11 Nov 2009 17:01:12 +0000 (+0000) Subject: blocks upgrade: MDL-20820 another blocks upgrade problem with sticky blocks X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=01de485dde7cc6c19b901b93bb6c46fa8655b3b4;p=moodle.git blocks upgrade: MDL-20820 another blocks upgrade problem with sticky blocks Even though the visible column is going to be dropped, we need to set it here or the query at line 2087 will fail. Huge thanks to Oleg Sychev who did all the debugging and testing for this fix. --- diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d281ce0760..fb0e7c0ba4 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2043,6 +2043,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); $newblock->defaultregion = $newregions[$stickyblock->position]; $newblock->defaultweight = $stickyblock->weight; $newblock->configdata = $stickyblock->configdata; + $newblock->visible = 1; $DB->insert_record('block_instances', $newblock); }