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

Dependency: Bug #5647
This commit is contained in:
ethem
2006-05-30 08:50:36 +00:00
parent 2137cc1d83
commit e77bbbe5b3
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -28,6 +28,7 @@
</td>
</tr>
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
<tr valign="top">
<td align="right">loginhttps:</td>
<td>
@@ -40,6 +41,7 @@
?>
</td>
</tr>
<?php } /* end: https && loginhttps */ ?>
<tr valign="top"><td colspan="3"><hr noshade="noshade" size="1"></td></tr>
+4 -4
View File
@@ -345,8 +345,8 @@ class enrolment_plugin extends enrolment_base {
if (empty($frm->an_tran_key) && empty($frm->an_password)) {
notify("an_tran_key or an_password required");
}
if (empty($CFG->loginhttps)) {
notify("\$CFG->loginhttps must be ON");
if (empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') {
notify("loginhttps must be ON");
}
}
@@ -360,8 +360,8 @@ class enrolment_plugin extends enrolment_base {
function process_config($config) {
global $CFG;
if (empty($CFG->loginhttps) || !$this->check_openssl_loaded())
{
if ((empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') ||
!$this->check_openssl_loaded()) {
return false;
}