diff --git a/admin/report/unsuproles/index.php b/admin/report/unsuproles/index.php index 7dfc731817f..fc2a318c562 100644 --- a/admin/report/unsuproles/index.php +++ b/admin/report/unsuproles/index.php @@ -92,7 +92,7 @@ foreach ($rs as $problem) { $rs->close(); if (!$problems) { - notify(get_string('noprolbems', 'report_unsuproles'), 'notifysuccess'); + echo $OUTPUT->notification(get_string('noprolbems', 'report_unsuproles'), 'notifysuccess'); } else { $roles = get_all_roles(); $data = array(); diff --git a/admin/uploadpicture.php b/admin/uploadpicture.php index f7ce6584ec6..e7f2ed0fe4e 100644 --- a/admin/uploadpicture.php +++ b/admin/uploadpicture.php @@ -82,7 +82,9 @@ if ($formdata = $mform->get_data()) { echo $OUTPUT->notification(get_string('uploadpicture_cannotmovezip','admin')); @remove_dir($zipdir); } else { - if (!unzip_file($dstfile, $zipdir, false)) { + $fp = get_file_packer('application/zip'); + $unzipresult = $fp->extract_to_pathname($dstfile, $zipdir); + if (!$unzipresult) { echo $OUTPUT->notification(get_string('uploadpicture_cannotunzip','admin')); @remove_dir($zipdir); } else { diff --git a/backup/lib.php b/backup/lib.php index a256b66c105..f3fee778028 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -577,7 +577,7 @@ $restore->rolesmapping = array(); if (isset($info->roles) && is_array($info->roles)) { foreach ($info->roles as $id => $info) { - if ($newroleid = get_field('role', 'id', 'shortname', $info->shortname)) { + if ($newroleid = $DB->get_field('role', 'id', array('shortname' => $info->shortname))) { $restore->rolesmapping[$id] = $newroleid; } } diff --git a/backup/restorelib.php b/backup/restorelib.php index cd4209f9a35..fd5781e6547 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -2000,8 +2000,8 @@ define('RESTORE_GROUPS_GROUPINGS', 3); } else { if (empty($noredirect)) { - print_continue($CFG->wwwroot.'/backup/restore.php?backup_unique_code='.$backup_unique_code.'&launch=form&file='.$file.'&id='.$id.'&sesskey='.sesskey()); - print_footer(); + echo $OUTPUT->continue_button(new moodle_url('/backup/restore.php', array('backup_unique_code'=>$backup_unique_code, 'launch'=>'form', 'file'=>$file, 'id'=>$id, 'sesskey'=>sesskey()))); + echo $OUTPUT->footer(); die; } else {