]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9836
authorethem <ethem>
Fri, 15 Jun 2007 17:40:58 +0000 (17:40 +0000)
committerethem <ethem>
Fri, 15 Jun 2007 17:40:58 +0000 (17:40 +0000)
Authorize.net / SSL Config Bug prevents display of options from enrol/authorize/enrol.php

enrol/authorize/enrol.php

index 42fb074cce9274f03dbced4a050a94f6ce3913bb..ffd536ce3db859a91bdfddde42a3c6e59fa7a7df 100755 (executable)
@@ -41,7 +41,7 @@ class enrolment_plugin_authorize
         prevent_double_paid($course);
         httpsrequired();
 
-        if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
+        if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 443) { // MDL-9836
             if (empty($CFG->loginhttps)) {
                 error(get_string('httpsrequired', 'enrol_authorize'));
             } else {
@@ -417,7 +417,7 @@ class enrolment_plugin_authorize
             notify(get_string('adminconfighttps', 'enrol_authorize', $a));
             return; // notice breaks the form and xhtml later
         }
-        elseif (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') {
+        elseif (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 443) { // MDL-9836
             $wwwsroot = qualified_me();
             $wwwsroot = str_replace('http:', 'https:', $wwwsroot);
             $a = new stdClass;