From cfc5b79b8619a28bc7112d1ba3c102a21684685c Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Thu, 3 Sep 2009 05:40:41 +0000 Subject: [PATCH] auth MDL-19788 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants --- auth/cas/auth.php | 9 ++++----- auth/email/auth.php | 9 ++++----- auth/ldap/auth.php | 9 ++++----- auth/ldap/ntlmsso_attempt.php | 7 ++++--- auth/ldap/ntlmsso_finish.php | 7 ++++--- auth/shibboleth/login.php | 12 +++++++----- 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 2b10451411..0ecb205387 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -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(); diff --git a/auth/email/auth.php b/auth/email/auth.php index 7f0bf5b066..01304c8611 100644 --- a/auth/email/auth.php +++ b/auth/email/auth.php @@ -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; diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index d422b39bdf..2bcf07ad58 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -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; diff --git a/auth/ldap/ntlmsso_attempt.php b/auth/ldap/ntlmsso_attempt.php index 1f2fbe238c..94298a1b00 100644 --- a/auth/ldap/ntlmsso_attempt.php +++ b/auth/ldap/ntlmsso_attempt.php @@ -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 = '

'.get_string('ntlmsso_attempting','auth_ldap').'

' . '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); } diff --git a/auth/shibboleth/login.php b/auth/shibboleth/login.php index 92cb2aa27b..107ce249c7 100644 --- a/auth/shibboleth/login.php +++ b/auth/shibboleth/login.php @@ -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, '
'.$langmenu.'
'); + $PAGE->navbar->add($loginsite); + $PAGE->set_title("$site->fullname: $loginsite"); + $PAGE->set_heading($site->fullname); + $PAGE->set_focuscontrol('idp'); + $PAGE->set_headingmenu('
'.$langmenu.'
'); + + echo $OUTPUT->header(); include("index_form.html"); echo $OUTPUT->footer(); -- 2.39.5