OK, this should finally fix the block upgrading problem.
The problem was that site_admin_menu had not been added to the database yet when we tried to update the blockinfo for the site.
This commit is contained in:
@@ -37,13 +37,6 @@ global $CFG;
|
||||
COMMENT = 'To register and update all the available blocks'");
|
||||
}
|
||||
|
||||
if (!empty($CFG->siteblocksadded)) { /// Set by main Moodle upgrade
|
||||
// Add blockinfo to the site course
|
||||
require_once($CFG->dirroot.'/lib/blocklib.php');
|
||||
$site = get_site();
|
||||
blocks_get_default_blocks($site->id, BLOCKS_DEFAULT_SITE);
|
||||
delete_records('config', 'name', 'siteblocksadded');
|
||||
}
|
||||
|
||||
//Finally, return result
|
||||
return $result;
|
||||
|
||||
@@ -39,13 +39,6 @@ global $CFG;
|
||||
|
||||
}
|
||||
|
||||
if (!empty($CFG->siteblocksadded)) { /// Set by main Moodle upgrade
|
||||
// Add blockinfo to the site course
|
||||
require_once($CFG->dirroot.'/lib/blocklib.php');
|
||||
$site = get_site();
|
||||
blocks_get_default_blocks($site->id, BLOCKS_DEFAULT_SITE);
|
||||
delete_records('config', 'name', 'siteblocksadded');
|
||||
}
|
||||
|
||||
//Finally, return result
|
||||
return $result;
|
||||
|
||||
@@ -705,6 +705,11 @@ function upgrade_blocks_plugins($continueto) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($CFG->siteblocksadded)) { /// This is a once-off hack to make a proper upgrade
|
||||
blocks_get_default_blocks(SITEID, BLOCKS_DEFAULT_SITE); // Add blockinfo to the site course
|
||||
delete_records('config', 'name', 'siteblocksadded');
|
||||
}
|
||||
|
||||
if (!empty($updated_blocks)) {
|
||||
print_continue($continueto);
|
||||
die;
|
||||
|
||||
Reference in New Issue
Block a user