* This method actually loads the blocks for our page from the database.
*/
public function load_blocks($includeinvisible = NULL) {
- global $DB;
+ global $DB, $CFG;
if (!is_null($this->birecordsbyregion)) {
// Already done.
return;
}
+ if ($CFG->version < 2009050619) {
+ // Upgrade/install not complete. Don't try too show any blocks.
+ $this->birecordsbyregion = array();
+ return;
+ }
+
if (is_null($includeinvisible)) {
$includeinvisible = $this->page->user_is_editing();
}
}
$this->initialise_standard_body_classes();
-
- if ($CFG->version >= 2009050619) {
- $this->blocks->load_blocks();
- }
+ $this->blocks->load_blocks();
}
/**