Slightly mkore reobust in the case where https was already being used

for the whole site.      bug 3848
This commit is contained in:
moodler
2005-08-09 15:14:49 +00:00
parent 4eb27d4a74
commit 8bc776ba4f
+1 -1
View File
@@ -5805,7 +5805,7 @@ function httpsrequired() {
if (!empty($CFG->loginhttps)) {
$HTTPSPAGEREQUIRED = true;
$CFG->httpswwwroot = str_replace('http', 'https', $CFG->wwwroot);
$CFG->httpswwwroot = str_replace('http:', 'https:', $CFG->wwwroot);
} else {
$CFG->httpswwwroot = $CFG->wwwroot;
}