Skip to content

Commit

Permalink
core MDL-19799 Updated print_header and build_navigation to OUTPUT an…
Browse files Browse the repository at this point in the history
…d PAGE equivalents
  • Loading branch information
samhemelryk committed Sep 7, 2009
1 parent b87573d commit 70f2551
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions error/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
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()) {
Expand Down
3 changes: 2 additions & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
}

// Do the main output.
print_header($title);
$PAGE->set_title($title);
echo $OUTPUT->header();
echo $OUTPUT->box_start();
print $output;
echo $OUTPUT->box_end();
Expand Down
2 changes: 1 addition & 1 deletion sso/hive/expired.php
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
5 changes: 4 additions & 1 deletion userpix/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@

$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);
Expand Down
5 changes: 4 additions & 1 deletion userpix/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

$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);
Expand Down

0 comments on commit 70f2551

Please sign in to comment.