Fix for bug 2241:

I hope this time I got everything changed to the new Page interface! I 'm
really sorry for messing up and breaking new installations... :(

Also moved the only two functions of the API outside the page_base class.
This commit is contained in:
defacer
2004-11-29 04:19:05 +00:00
parent a9e91540df
commit 9b12850043
10 changed files with 64 additions and 67 deletions
+2 -2
View File
@@ -845,14 +845,14 @@ function upgrade_blocks_plugins($continueto) {
//Iterate over each course
if ($courses = get_records('course')) {
foreach ($courses as $course) {
$page = MoodlePage::create_object(MOODLE_PAGE_COURSE, $course->id);
$page = page_create_object(MOODLE_PAGE_COURSE, $course->id);
blocks_repopulate_page($page);
}
}
}
if (!empty($CFG->siteblocksadded)) { /// This is a once-off hack to make a proper upgrade
$page = MoodlePage::create_object(MOODLE_PAGE_COURSE, SITEID);
$page = page_create_object(MOODLE_PAGE_COURSE, SITEID);
blocks_repopulate_page($page);
delete_records('config', 'name', 'siteblocksadded');
}