core MDL-19786 Cleaned up a couple of minor deprecated calls

This commit is contained in:
Sam Hemelryk
2010-09-22 07:48:35 +00:00
parent b0d038ef28
commit 8d3950ea2e
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -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();
+3 -1
View File
@@ -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
View File
@@ -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;
}
}
+2 -2
View File
@@ -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 {