blocklib: MDL-19010 move the check for whether the right database tables exist to a place where it is better encapsulated.
This commit is contained in:
+7
-1
@@ -247,12 +247,18 @@ class block_manager implements ArrayAccess {
|
||||
* 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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user