]> git.mjollnir.org Git - moodle.git/commitdiff
auth MDL-19788 Added PAGE->set_url calls and removed $Id tags
authorsamhemelryk <samhemelryk>
Thu, 15 Oct 2009 02:34:31 +0000 (02:34 +0000)
committersamhemelryk <samhemelryk>
Thu, 15 Oct 2009 02:34:31 +0000 (02:34 +0000)
auth/ldap/ntlmsso_attempt.php
auth/ldap/ntlmsso_finish.php
auth/mnet/jump.php
auth/mnet/land.php
auth/shibboleth/index.php
auth/shibboleth/login.php

index 94298a1b0075e8b0926a4e788c9335b9fdbc30b2..3b1aaaaf1d675eb68024b47a35b6cdbe301ede3b 100644 (file)
@@ -5,6 +5,8 @@ require_once(dirname(dirname(dirname(__FILE__)))."/config.php");
 //HTTPS is potentially required in this page
 httpsrequired();
 
+$PAGE->set_url(new moodle_url($CFG->wwwroot.'/auth/ldap/ntlmsso_attempt.php'));
+
 /// Define variables used in page
 if (!$site = get_site()) {
     print_error("siteisnotdefined");
index 4ee0642859a893a2d662c7f91e623d06a00f0886..0356df34e7b81942a2e78abfabe60b0fb5729d20 100644 (file)
@@ -5,6 +5,8 @@ require_once(dirname(dirname(dirname(__FILE__)))."/config.php");
 //HTTPS is potentially required in this page
 httpsrequired();
 
+$PAGE->set_url(new moodle_url($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php'));
+
 /// Define variables used in page
 if (!$site = get_site()) {
     print_error("siteisnotdefined", 'debug');
index f7796a5ea5450981e4f543d4bfcdcece064974d8..6a4f23cb8300343e569cc07d64eb8aa9309f22ff 100644 (file)
 
 require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
 
-require_login(SITEID,false);
-
-if (!is_enabled_auth('mnet')) {
-    print_error('mnetdisable');
-}
-
 // grab the GET params - wantsurl could be anything - take it
 // with PARAM_RAW
 $hostid = optional_param('hostid', '0', PARAM_INT);
 $hostwwwroot = optional_param('hostwwwroot', '', PARAM_URL);
 $wantsurl = optional_param('wantsurl', '', PARAM_RAW);
 
+$url = new moodle_url($CFG->wwwroot.'/auth/mnet/jump.php');
+if ($hostid !== '0') $url->param('hostid', $hostid);
+if ($hostwwwroot !== '') $url->param('hostwwwroot', $hostwwwroot);
+if ($wantsurl !== '') $url->param('wantsurl', $wantsurl);
+$PAGE->set_url($url);
+
+require_login(SITEID,false);
+
+if (!is_enabled_auth('mnet')) {
+    print_error('mnetdisable');
+}
+
 // If hostid hasn't been specified, try getting it using wwwroot
 if (!$hostid) {
     $hostid = $DB->get_field('mnet_host', 'id', array('wwwroot' => $hostwwwroot));
index 4dec821c89d0744bc0ac0d7a336bc173bb68cac0..bb95440a219e7703402c8bfb1d79e6835c526dd3 100644 (file)
 require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
 require_once $CFG->dirroot . '/mnet/xmlrpc/client.php';
 
+// grab the GET params
+$token         = required_param('token',    PARAM_BASE64);
+$remotewwwroot = required_param('idp',      PARAM_URL);
+$wantsurl      = required_param('wantsurl', PARAM_LOCALURL);
+$wantsremoteurl = optional_param('remoteurl', false, PARAM_BOOL);
+
+$url = new moodle_url($CFG->wwwroot.'/auth/mnet/jump.php', array('token'=>$token, 'idp'=>$remotewwwroot, 'wantsurl'=>$wantsurl));
+if ($wantsremoteurl !== false) $url->param('remoteurl', $wantsremoteurl);
+$PAGE->set_url($url);
+
 if (!$site = get_site()) {
     print_error('mnet_session_prohibited', 'mnet', '', '');
 }
@@ -22,11 +32,6 @@ if (!$site = get_site()) {
 if (!is_enabled_auth('mnet')) {
     print_error('mnetdisable');
 }
-// grab the GET params
-$token         = required_param('token',    PARAM_BASE64);
-$remotewwwroot = required_param('idp',      PARAM_URL);
-$wantsurl      = required_param('wantsurl', PARAM_LOCALURL);
-$wantsremoteurl = optional_param('remoteurl', false, PARAM_BOOL);
 
 // confirm the MNET session
 $mnetauth = get_auth_plugin('mnet');
index 562a28ff8c304719d4a55455fcdef4a4ab1d60f4..0744ed925ef94c426d86924da4da22111b7fd215 100644 (file)
@@ -1,8 +1,11 @@
-<?php // $Id$
-      // Designed to be redirected from moodle/login/index.php
+<?php
+
+    // Designed to be redirected from moodle/login/index.php
 
     require('../../config.php');
 
+    $PAGE->set_url(new moodle_url($CFG->wwwroot.'/auth/shibboleth/index.php'));
+
     if (isloggedin() && $USER->username != 'guest') {      // Nothing to do
         if (isset($SESSION->wantsurl) and (strpos($SESSION->wantsurl, $CFG->wwwroot) === 0)) {
             $urltogo = $SESSION->wantsurl;    /// Because it's an address in this site
index 03f23746b602078c84a945a75b116a127add86f9..dd57528e269c83fcf4abd6529f1f2a6943e032d4 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
     require_once("../../config.php");
     require_once($CFG->dirroot."/auth/shibboleth/auth.php");
@@ -79,6 +79,7 @@ httpsrequired();
 
     $loginsite = get_string("loginsite");
 
+    $PAGE->set_url(new moodle_url($CFG->wwwroot.'/auth/shibboleth/login.php'));
     $PAGE->navbar->add($loginsite);
     $PAGE->set_title("$site->fullname: $loginsite");
     $PAGE->set_heading($site->fullname);