blocklib: MDL-19010 eliminate remaining calls to blocks_repopulate_page

This commit is contained in:
tjhunt 2009-05-08 08:22:59 +00:00
parent cf37931b7f
commit 6cbcbf0fb3
7 changed files with 15 additions and 17 deletions

View file

@ -842,8 +842,7 @@ define('RESTORE_GROUPS_GROUPINGS', 3);
if (empty($backup_block_format)) { // This is a backup from Moodle < 1.5
if (empty($blockinfo)) {
// Looks like it's from Moodle < 1.3. Let's give the course default blocks...
$newpage = page_create_object(PAGE_COURSE_VIEW, $restore->course_id);
blocks_repopulate_page($newpage);
blocks_add_default_course_blocks($DB->get_record('course', array('id' => $restore->course_id)));
} else {
// We just have a blockinfo field, this is a legacy 1.4 or 1.3 backup
$blockrecords = $DB->get_records('block', null, '', 'name, id');