]> git.mjollnir.org Git - moodle.git/commitdiff
$PAGE MDL-19077 fix call to set_url to make it handle https
authormoodler <moodler>
Thu, 3 Sep 2009 08:27:30 +0000 (08:27 +0000)
committermoodler <moodler>
Thu, 3 Sep 2009 08:27:30 +0000 (08:27 +0000)
login/index.php

index c8efd9a01ca7e7b5196f7f08f81c4e600305e04c..e7c23739bef666c97b7b5d51af16bc1fc9c7652d 100644 (file)
@@ -11,9 +11,7 @@
     $context = get_context_instance(CONTEXT_SYSTEM);
     $PAGE->set_course($SITE);
 
-    $PAGE->set_url($CFG->wwwroot.'/login/index.php');
-
-    //initialize variables
+/// Initialize variables
     $errormsg = '';
     $errorcode = 0;
 
@@ -38,6 +36,8 @@
 //HTTPS is potentially required in this page
     httpsrequired();
 
+    $PAGE->set_url("$CFG->httpswwwroot/login/index.php");
+
 /// Define variables used in page
     if (!$site = get_site()) {
         print_error('siteisnotdefined', 'debug');