From 534f203df76f1b848bd4da17800ff8603f5551c8 Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Mon, 7 Sep 2009 04:11:32 +0000 Subject: [PATCH] files MDL-19799 Updated print_header and build_navigation to OUTPUT and PAGE equivalents --- files/draftfiles.php | 4 ++-- files/index.php | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/files/draftfiles.php b/files/draftfiles.php index 11dd043f04..dd84fc025b 100644 --- a/files/draftfiles.php +++ b/files/draftfiles.php @@ -98,7 +98,7 @@ if (isset($_FILES['newfile']) and data_submitted() and confirm_sesskey()) { if ($delete !== '' and $file = $fs->get_file($contextid, $filearea, $itemid, $filepath, $delete)) { if (!data_submitted() or !confirm_sesskey()) { - print_header(); + echo $OUTPUT->header(); echo $OUTPUT->notification(get_string('deletecheckwarning').': '.s($file->get_filepath().$file->get_filename())); $optionsno = array('itemid'=>$itemid, 'filepath'=>$filepath, 'subdirs'=>$subdirs); $optionsyes = array('itemid'=>$itemid, 'filepath'=>$filepath, 'delete'=>$delete, 'sesskey'=>sesskey(), 'subdirs'=>$subdirs); @@ -117,7 +117,7 @@ if ($delete !== '' and $file = $fs->get_file($contextid, $filearea, $itemid, $fi } } -print_header(); +echo $OUTPUT->header(); if ($notice !== '') { echo $OUTPUT->notification($notice); diff --git a/files/index.php b/files/index.php index e900b8ca39..536017110c 100644 --- a/files/index.php +++ b/files/index.php @@ -108,7 +108,7 @@ if ($file_info and $file_info->is_directory() and $file_info->is_writable() and if ($file_info and $delete) { if (!data_submitted() or !confirm_sesskey()) { - print_header(); + echo $OUTPUT->header(); echo $OUTPUT->notification(get_string('deletecheckwarning').': '.$file_info->get_visible_name()); $parent_info = $file_info->get_parent(); @@ -180,15 +180,12 @@ function html_footer() { } function html_header($context, $file_info){ - global $CFG, $SITE; + global $CFG, $SITE, $PAGE, $OUTPUT; - $navlinks = array(); $strfiles = get_string("files"); - - $navlinks[] = array('name' => $strfiles, 'link' => null, 'type' => 'misc'); - - $navigation = build_navigation($navlinks); - print_header("$SITE->shortname: $strfiles", '', $navigation); + $PAGE->navbar->add($strfiles); + $PAGE->set_title("$SITE->shortname: $strfiles"); + echo $OUTPUT->header(); echo ""; echo ""; -- 2.39.5