]> git.mjollnir.org Git - moodle.git/commitdiff
blocks upgrade: MDL-20820 another blocks upgrade problem with sticky blocks
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 11 Nov 2009 17:01:12 +0000 (17:01 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 11 Nov 2009 17:01:12 +0000 (17:01 +0000)
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.

lib/db/upgrade.php

index d281ce0760ef9bf7ceb5cd8a4418b9864f1eff90..fb0e7c0ba447b7230336ec86cfc1f808722809b6 100644 (file)
@@ -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);
         }