Skip to content

Commit

Permalink
core MDL-19786 Cleaned up a couple of minor deprecated calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Sep 22, 2010
1 parent b0d038e commit 8d3950e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion admin/report/unsuproles/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
$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();
Expand Down
4 changes: 3 additions & 1 deletion admin/uploadpicture.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
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 {
Expand Down
2 changes: 1 addition & 1 deletion backup/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ function import_backup_file_silently($pathtofile,$destinationcourse,$emptyfirst=
$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;
}
}
Expand Down
4 changes: 2 additions & 2 deletions backup/restorelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2000,8 +2000,8 @@ function restore_precheck($id,$file,&$errorstr,$noredirect=false) {
}
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 {
Expand Down

0 comments on commit 8d3950e

Please sign in to comment.