]> git.mjollnir.org Git - moodle.git/commitdiff
files MDL-19799 Updated print_header and build_navigation to OUTPUT and PAGE equivalents
authorsamhemelryk <samhemelryk>
Mon, 7 Sep 2009 04:11:32 +0000 (04:11 +0000)
committersamhemelryk <samhemelryk>
Mon, 7 Sep 2009 04:11:32 +0000 (04:11 +0000)
files/draftfiles.php
files/index.php

index 11dd043f0484ad07334030599356933ea87e106e..dd84fc025b03eb06d657d7686fd31b5433a4a1ef 100644 (file)
@@ -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);
index e900b8ca3904d4a484bbff6f36b47b206cab4ebb..536017110c42f74066a322cffa9f4e6134cf8ce4 100644 (file)
@@ -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 "<table border=\"0\" style=\"margin-left:auto;margin-right:auto\" cellspacing=\"3\" cellpadding=\"3\" width=\"740\">";
     echo "<tr>";