Permalink
Browse files

If config wwwroot starts with 'https', ignore config loginhttps value.

Dependency: Bug #5647; Merged from MOODLE_16_STABLE.
  • Loading branch information...
1 parent 8af190b commit 8761b0bc4f3e9275b49c1be7a133ce16562d32a9 ethem committed May 30, 2006
Showing with 7 additions and 5 deletions.
  1. +2 −2 enrol/authorize/config.html
  2. +5 −3 enrol/authorize/enrol.php
@@ -47,7 +47,7 @@
<td><?php print_string("currency") ?>
</td>
</tr>
-
+<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
<tr valign="top">
<td align="right">loginhttps:</td>
<td><?php echo (empty($CFG->loginhttps) ? "<font color=\"red\"><b>off</b></font>" : "<font color=\"green\">on</font>") ?></td>
@@ -56,7 +56,7 @@
print_string("logindesc", "enrol_authorize", $a)
?></td>
</tr>
-
+<?php } /* end: https && loginhttps */ ?>
<tr valign="top"><td colspan="3"><h4><?php print_string("adminauthorizesettings", "enrol_authorize") ?></h4></td></tr>
<tr valign="top">
@@ -451,7 +451,7 @@ function config_form($frm)
notify('PHP must be compiled with SSL support (--with-openssl)');
}
- if (empty($CFG->loginhttps)) {
+ if (empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') {
notify('loginhttps must be ON');
}
@@ -540,8 +540,10 @@ function process_config($config)
$tranval = optional_param('an_tran_key', '');
$passwordval = optional_param('an_password', '');
- if (empty($CFG->loginhttps) || (!$this->check_openssl_loaded()) ||
- empty($loginval) || (empty($tranval) && empty($passwordval))) {
+ if ((empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') ||
+ !$this->check_openssl_loaded() ||
+ empty($loginval) ||
+ (empty($tranval) and empty($passwordval))) {
return false;
}

0 comments on commit 8761b0b

Please sign in to comment.