]> git.mjollnir.org Git - moodle.git/commitdiff
core MDL-19799 Updated print_header and build_navigation to OUTPUT and PAGE equivalents
authorsamhemelryk <samhemelryk>
Mon, 7 Sep 2009 07:20:14 +0000 (07:20 +0000)
committersamhemelryk <samhemelryk>
Mon, 7 Sep 2009 07:20:14 +0000 (07:20 +0000)
error/index.php
help.php
sso/hive/expired.php
userpix/index.php
userpix/upgrade.php

index 450f4b54b7992ff55d5cdb18cd3e2211f8146dae..dbe2157a54534be034102ef4a58b278cc76a3cae 100644 (file)
     header("HTTP/1.0 404 Not Found");
     header("Status: 404 Not Found");
 
-    print_header($site->fullname .':Error', $site->fullname .': Error 404', 'Error 404 - File not Found', '');
-
+    $PAGE->set_title($site->fullname .':Error');
+    $PAGE->set_heading($site->fullname .': Error 404');
+    $PAGE->navbar->add('Error 404 - File not Found');
+    echo $OUTPUT->header();
     echo $OUTPUT->box(get_string('pagenotexist', 'error'). '<br />'.s($requesturi), 'generalbox boxaligncenter');
 
     if (isloggedin()) {
index 4fc66f050c7a22f0e7392c9d6c8a940a54f1db27..8bca3cec706a152a6a4046d56ac38a1a385ccf3b 100644 (file)
--- a/help.php
+++ b/help.php
@@ -93,7 +93,8 @@ if(preg_match('~(##emoticons_html##)~', $output, $matches)) {
 }
 
 // Do the main output.
-print_header($title);
+$PAGE->set_title($title);
+echo $OUTPUT->header();
 echo $OUTPUT->box_start();
 print $output;
 echo $OUTPUT->box_end();
index bd74315aaa594d24ee887d154311c7642291c6a4..1079173b193d3b73decfecc2eb9d3d0a246b1fec 100644 (file)
@@ -9,7 +9,7 @@
 
     //MW theres no easy way to log in seamlessly. We need the users unhashed password.
     // It's a security risk to carry that in $SESSION so we put up login form.
-    print_header();
+    echo $OUTPUT->header();
     echo $OUTPUT->notification('Your session has expired. Please log in again.'); 
 ?>
       <form action="login.php" method="post" id="login">
index 58e66f62bda418f7f2ce25049eb2aa3c18f55ed9..24454189abc076cf3d93597230c115175dd36613 100644 (file)
 
     $title = get_string("users");
 
-    print_header($title, $title, build_navigation(array(array('name' => $title, 'link' => null, 'type' => 'misc'))));
+    $PAGE->navbar->add($title);
+    $PAGE->set_title($title);
+    $PAGE->set_heading($title);
+    echo $OUTPUT->header();
 
     foreach ($users as $user) {
         $fullname = fullname($user);
index bcf1e77e603b2089c1d1950450c73c9d40b54b26..fe1cd6c85a5d2a35270bc196bf0e1b38901f1f67 100644 (file)
 
     $title = get_string("users");
 
-    print_header($title, $title, build_navigation(array(array('name' => $title, 'link' => null, 'type' => 'misc'))));
+    $PAGE->navbar->add($title);
+    $PAGE->set_title($title);
+    $PAGE->set_heading($title);
+    echo $OUTPUT->header();
 
     foreach ($users as $user) {
         upgrade_profile_image($user->id);