core MDL-19786 Cleaned up a couple of minor deprecated calls
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user