]> git.mjollnir.org Git - moodle.git/commitdiff
Booleans are not always transformed to 0 /1. This was preventing install
authorstronk7 <stronk7>
Fri, 19 Oct 2007 17:53:23 +0000 (17:53 +0000)
committerstronk7 <stronk7>
Fri, 19 Oct 2007 17:53:23 +0000 (17:53 +0000)
under mysqli. Define block->multiple if needed.

Merged from MOODLE_19_STABLE

lib/blocklib.php

index 5bfd6fd7acb7b821d3d0c5d4e5dd282239b171b8..be131b7942406f64bcc8c65a9bd5fc8f502e3987 100644 (file)
@@ -1319,7 +1319,9 @@ function upgrade_blocks_plugins($continueto) {
         } else {    // block not installed yet, so install it
 
             // If it allows multiples, start with it enabled
-            $block->multiple = $blockobj->instance_allow_multiple();
+            if ($blockobj->instance_allow_multiple()) {
+                $block->multiple = 1;
+            }
 
             // Set the block cron on install
             $block->cron = !empty($blockobj->cron) ? $blockobj->cron : 0;