]> git.mjollnir.org Git - moodle.git/commitdiff
auth MDL-19788 Upgraded print_header and build_navigation calls to use PAGE and OUTPU...
authorsamhemelryk <samhemelryk>
Thu, 3 Sep 2009 05:40:41 +0000 (05:40 +0000)
committersamhemelryk <samhemelryk>
Thu, 3 Sep 2009 05:40:41 +0000 (05:40 +0000)
auth/cas/auth.php
auth/email/auth.php
auth/ldap/auth.php
auth/ldap/ntlmsso_attempt.php
auth/ldap/ntlmsso_finish.php
auth/shibboleth/login.php

index 2b10451411d6fadcae8492c9c5224f9951b7d298..0ecb2053873de1ed22c2481c1ed4bb8412f9037b 100644 (file)
@@ -132,11 +132,10 @@ class auth_plugin_cas extends auth_plugin_base {
 // test pgtIou parameter for proxy mode (https connection
 // in background from CAS server to the php server)
       if ($authCAS!="CAS" && !isset($_GET["pgtIou"])) {
-            $navlinks = array();
-            $navlinks[] = array('name' => $CASform, 'link' => null, 'type' => 'misc');
-            $navigation = build_navigation($navlinks);
-
-            print_header("$site->fullname: $CASform", $site->fullname, $navigation);
+            $PAGE->navbar->add($CASform);
+            $PAGE->set_title("$site->fullname: $CASform");
+            $PAGE->set_heading($site->fullname);
+            echo $OUTPUT->header();
             include($CFG->dirroot."/auth/cas/cas_form.html");
             echo $OUTPUT->footer();
             exit();
index 7f0bf5b0661c7f752b1b59cddc290888f64d15ff..01304c8611590f107f46d415e471e3c1c7b065a5 100644 (file)
@@ -96,11 +96,10 @@ class auth_plugin_email extends auth_plugin_base {
         if ($notify) {
             global $CFG;
             $emailconfirm = get_string('emailconfirm');
-            $navlinks = array();
-            $navlinks[] = array('name' => $emailconfirm, 'link' => null, 'type' => 'misc');
-            $navigation = build_navigation($navlinks);
-
-            print_header($emailconfirm, $emailconfirm, $navigation);
+            $PAGE->navbar->add($emailconfirm);
+            $PAGE->set_title($emailconfirm);
+            $PAGE->set_heading($emailconfirm);
+            echo $OUTPUT->header();
             notice(get_string('emailconfirmsent', '', $user->email), "$CFG->wwwroot/index.php");
         } else {
             return true;
index d422b39bdf657a53ec91bb4997e2261b92255451..2bcf07ad582d43a372e8b773113d1334bd37d204 100644 (file)
@@ -439,11 +439,10 @@ class auth_plugin_ldap extends auth_plugin_base {
         if ($notify) {
             global $CFG;
             $emailconfirm = get_string('emailconfirm');
-            $navlinks = array();
-            $navlinks[] = array('name' => $emailconfirm, 'link' => null, 'type' => 'misc');
-            $navigation = build_navigation($navlinks);
-
-            print_header($emailconfirm, $emailconfirm, $navigation);
+            $PAGE->navbar->add($emailconfirm);
+            $PAGE->set_title($emailconfirm);
+            $PAGE->set_heading($emailconfirm);
+            echo $OUTPUT->header();
             notice(get_string('emailconfirmsent', '', $user->email), "$CFG->wwwroot/index.php");
         } else {
             return true;
index 1f2fbe238ca15311607d80dccccd2b53be2236e3..94298a1b0075e8b0926a4e788c9335b9fdbc30b2 100644 (file)
@@ -27,9 +27,10 @@ $sesskey = sesskey();
 // and FF 3.x (Windows version at least) where javascript timers fire up even
 // when we've already left the page that set the timer.
 $loginsite = get_string("loginsite");
-$navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc'));
-$navigation = build_navigation($navlinks);
-print_header("$site->fullname: $loginsite", $site->fullname, $navigation, '', '', true);
+$PAGE->navbar->add($loginsite);
+$PAGE->set_title("$site->fullname: $loginsite");
+$PAGE->set_heading($site->fullname);
+echo $OUTPUT->header();
 
 $msg = '<p>'.get_string('ntlmsso_attempting','auth_ldap').'</p>'
     . '<img width="1", height="1" '
index b0353e8ee938aed5f448fede8f8cbd5e5f296d2c..4ee0642859a893a2d662c7f91e623d06a00f0886 100644 (file)
@@ -27,9 +27,10 @@ if (!$authplugin->ntlmsso_finish()) {
     // Display the page header. This makes redirect respect the timeout we specify
     // here (and not add 3 more secs).
     $loginsite = get_string("loginsite");
-    $navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc'));
-    $navigation = build_navigation($navlinks);
-    print_header("$site->fullname: $loginsite", $site->fullname, $navigation, '', '', true);
+    $PAGE->navbar->add($loginsite);
+    $PAGE->set_title("$site->fullname: $loginsite");
+    $PAGE->set_heading($site->fullname);
+    echo $OUTPUT->header();
     redirect($CFG->httpswwwroot . '/login/index.php?authldap_skipntlmsso=1', 
              get_string('ntlmsso_failed','auth_ldap'), 3);
 }
index 92cb2aa27bb6c045b251d6726a6252599c5fa2d8..107ce249c752c2980addc96ac21e790322615bb0 100644 (file)
@@ -71,12 +71,14 @@ httpsrequired();
     }
 
     $loginsite = get_string("loginsite");
-    $navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc'));
-    $navigation = build_navigation($navlinks);
-    $focus = 'idp';
-    print_header("$site->fullname: $loginsite", $site->fullname, $navigation, $focus,
-                 '', true, '<div class="langmenu">'.$langmenu.'</div>');
 
+    $PAGE->navbar->add($loginsite);
+    $PAGE->set_title("$site->fullname: $loginsite");
+    $PAGE->set_heading($site->fullname);
+    $PAGE->set_focuscontrol('idp');
+    $PAGE->set_headingmenu('<div class="langmenu">'.$langmenu.'</div>');
+    
+    echo $OUTPUT->header();
     include("index_form.html");
     echo $OUTPUT->footer();