diff --git a/admin/tool/mobile/classes/api.php b/admin/tool/mobile/classes/api.php
index 8741016dbe0..bfc42ee0226 100644
--- a/admin/tool/mobile/classes/api.php
+++ b/admin/tool/mobile/classes/api.php
@@ -134,7 +134,7 @@ class api {
list($maintenancemessage, $notusedformat) = external_format_text($CFG->maintenance_message, FORMAT_MOODLE, $context->id);
$settings = array(
'wwwroot' => $CFG->wwwroot,
- 'httpswwwroot' => $CFG->httpswwwroot,
+ 'httpswwwroot' => $CFG->wwwroot,
'sitename' => external_format_string($SITE->fullname, $context->id, true),
'guestlogin' => $CFG->guestloginbutton,
'rememberusername' => $CFG->rememberusername,
diff --git a/admin/tool/mobile/tests/externallib_test.php b/admin/tool/mobile/tests/externallib_test.php
index 328011a492e..b5986aa9d9a 100644
--- a/admin/tool/mobile/tests/externallib_test.php
+++ b/admin/tool/mobile/tests/externallib_test.php
@@ -235,7 +235,6 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
// Need to simulate a non HTTPS site here.
$CFG->wwwroot = str_replace('https:', 'http:', $CFG->wwwroot);
- $CFG->httpswwwroot = str_replace('https:', 'http:', $CFG->wwwroot);
$this->resetAfterTest(true);
$this->setAdminUser();
diff --git a/auth/classes/output/login.php b/auth/classes/output/login.php
index 8bdf91de9e2..e42707a5dee 100644
--- a/auth/classes/output/login.php
+++ b/auth/classes/output/login.php
@@ -90,8 +90,8 @@ class login implements renderable, templatable {
$this->autofocusform = !empty($CFG->loginpageautofocus);
$this->rememberusername = isset($CFG->rememberusername) and $CFG->rememberusername == 2;
- $this->forgotpasswordurl = new moodle_url($CFG->httpswwwroot . '/login/forgot_password.php');
- $this->loginurl = new moodle_url($CFG->httpswwwroot . '/login/index.php');
+ $this->forgotpasswordurl = new moodle_url($CFG->wwwroot . '/login/forgot_password.php');
+ $this->loginurl = new moodle_url($CFG->wwwroot . '/login/index.php');
$this->signupurl = new moodle_url('/login/signup.php');
// Authentication instructions.
diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php
index 6cf1f2819ec..91218ad193f 100644
--- a/auth/ldap/auth.php
+++ b/auth/ldap/auth.php
@@ -1671,8 +1671,8 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($referer &&
$referer != $CFG->wwwroot &&
$referer != $CFG->wwwroot . '/' &&
- $referer != $CFG->httpswwwroot . '/login/' &&
- $referer != $CFG->httpswwwroot . '/login/index.php') {
+ $referer != $CFG->wwwroot . '/login/' &&
+ $referer != $CFG->wwwroot . '/login/index.php') {
$SESSION->wantsurl = $referer;
}
}
@@ -1684,7 +1684,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$sesskey = sesskey();
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_magic.php?sesskey='.$sesskey);
} else if ($this->config->ntlmsso_ie_fastpath == AUTH_NTLM_FASTPATH_YESFORM) {
- redirect($CFG->httpswwwroot.'/login/index.php?authldap_skipntlmsso=1');
+ redirect($CFG-wwwroot.'/login/index.php?authldap_skipntlmsso=1');
}
}
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_attempt.php');
@@ -1699,7 +1699,7 @@ class auth_plugin_ldap extends auth_plugin_base {
// we don't want to use at all. As we can't get rid of it, just point
// $SESSION->wantsurl to $CFG->wwwroot (after all, we came from there).
if (empty($SESSION->wantsurl)
- && (get_local_referer() == $CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php')) {
+ && (get_local_referer() == $CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php')) {
$SESSION->wantsurl = $CFG->wwwroot;
}
diff --git a/auth/ldap/ntlmsso_attempt.php b/auth/ldap/ntlmsso_attempt.php
index 155866b14d7..3a7ad512906 100644
--- a/auth/ldap/ntlmsso_attempt.php
+++ b/auth/ldap/ntlmsso_attempt.php
@@ -32,6 +32,6 @@ echo $OUTPUT->header();
$msg = '
'.get_string('ntlmsso_attempting', 'auth_ldap').'
'
. '
wwwroot . '/auth/ldap/ntlmsso_magic.php?sesskey='
. $sesskey . '" />';
-redirect($CFG->httpswwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
+redirect($CFG->wwwroot . '/auth/ldap/ntlmsso_finish.php', $msg, 3);
diff --git a/auth/ldap/ntlmsso_finish.php b/auth/ldap/ntlmsso_finish.php
index e1b816f1d69..31732425259 100644
--- a/auth/ldap/ntlmsso_finish.php
+++ b/auth/ldap/ntlmsso_finish.php
@@ -29,6 +29,6 @@ if (!$authplugin->ntlmsso_finish()) {
$PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
- redirect($CFG->httpswwwroot . '/login/index.php?authldap_skipntlmsso=1',
+ redirect($CFG->wwwroot . '/login/index.php?authldap_skipntlmsso=1',
get_string('ntlmsso_failed','auth_ldap'), 3);
}
diff --git a/auth/ldap/ntlmsso_magic.php b/auth/ldap/ntlmsso_magic.php
index fcbdf890d38..9b85989d400 100644
--- a/auth/ldap/ntlmsso_magic.php
+++ b/auth/ldap/ntlmsso_magic.php
@@ -26,7 +26,7 @@ $file = $CFG->dirroot.'/pix/spacer.gif';
if ($authplugin->ntlmsso_magic($sesskey) && file_exists($file)) {
if (!empty($authplugin->config->ntlmsso_ie_fastpath)) {
if (core_useragent::is_ie()) {
- redirect($CFG->httpswwwroot.'/auth/ldap/ntlmsso_finish.php');
+ redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_finish.php');
}
}
diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php
index d4293f459cd..1f269f77ff2 100644
--- a/auth/mnet/auth.php
+++ b/auth/mnet/auth.php
@@ -1073,7 +1073,7 @@ class auth_plugin_mnet extends auth_plugin_base {
global $DB, $CFG;
// strip off wwwroot, since the remote site will prefix it's return url with this
- $wantsurl = preg_replace('/(' . preg_quote($CFG->wwwroot, '/') . '|' . preg_quote($CFG->httpswwwroot, '/') . ')/', '', $wantsurl);
+ $wantsurl = preg_replace('/(' . preg_quote($CFG->wwwroot, '/') . ')/', '', $wantsurl);
$sql = "SELECT DISTINCT h.id, h.wwwroot, h.name, a.sso_jump_url, a.name as application
FROM {mnet_host} h
diff --git a/auth/oauth2/classes/auth.php b/auth/oauth2/classes/auth.php
index be9901285ce..65b399594d5 100644
--- a/auth/oauth2/classes/auth.php
+++ b/auth/oauth2/classes/auth.php
@@ -339,7 +339,7 @@ class auth extends \auth_plugin_base {
$PAGE->set_title($title);
$PAGE->set_heading($PAGE->course->fullname);
echo $OUTPUT->header();
- notice($message, "$CFG->httpswwwroot/index.php");
+ notice($message, "$CFG->wwwroot/index.php");
}
/**
@@ -363,7 +363,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('loginerror_nouserinfo', 'auth_oauth2');
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
if (empty($userinfo['username']) || empty($userinfo['email'])) {
// Trigger login failed event.
@@ -375,7 +375,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('loginerror_userincomplete', 'auth_oauth2');
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
$userinfo['username'] = trim(core_text::strtolower($userinfo['username']));
@@ -416,7 +416,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('confirmationpending', 'auth_oauth2');
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
} else if (!empty($linkedlogin)) {
// Trigger login failed event.
@@ -428,7 +428,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('confirmationpending', 'auth_oauth2');
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
$issuer = $client->get_issuer();
@@ -442,7 +442,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('notloggedindebug', 'auth_oauth2', get_string('loginerror_invaliddomain', 'auth_oauth2'));
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
if (!$userwasmapped) {
@@ -481,7 +481,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('accountexists', 'auth_oauth2');
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
if (email_is_not_allowed($userinfo['email'])) {
@@ -495,7 +495,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('notloggedindebug', 'auth_oauth2', $reason);
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
if (!empty($CFG->authpreventaccountcreation)) {
@@ -509,7 +509,7 @@ class auth extends \auth_plugin_base {
$errormsg = get_string('notloggedindebug', 'auth_oauth2', $reason);
$SESSION->loginerrormsg = $errormsg;
$client->log_out();
- redirect(new moodle_url($CFG->httpswwwroot . '/login/index.php'));
+ redirect(new moodle_url($CFG->wwwroot . '/login/index.php'));
}
if ($issuer->get('requireconfirmation')) {
diff --git a/auth/shibboleth/login.php b/auth/shibboleth/login.php
index 4b41bd6895a..721af8079f9 100644
--- a/auth/shibboleth/login.php
+++ b/auth/shibboleth/login.php
@@ -41,17 +41,17 @@
// Redirect to SessionInitiator with entityID as argument
if (isset($IdPs[$selectedIdP][1]) && !empty($IdPs[$selectedIdP][1])) {
// For Shibbolet 1.x Service Providers
- header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
+ header('Location: '.$IdPs[$selectedIdP][1].'?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
// For Shibbolet 2.x Service Providers
- // header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
+ // header('Location: '.$IdPs[$selectedIdP][1].'?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
} else {
// For Shibbolet 1.x Service Providers
- header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
+ header('Location: /Shibboleth.sso?providerId='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
// For Shibboleth 2.x Service Providers
- // header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->httpswwwroot.'/auth/shibboleth/index.php'));
+ // header('Location: /Shibboleth.sso/DS?entityID='. urlencode($selectedIdP) .'&target='. urlencode($CFG->wwwroot.'/auth/shibboleth/index.php'));
}
} elseif (isset($_POST['idp']) && !isset($IdPs[$_POST['idp']])) {
$errormsg = get_string('auth_shibboleth_errormsg', 'auth_shibboleth');
diff --git a/comment/index.php b/comment/index.php
index c6e1a4233da..470d3a5417f 100644
--- a/comment/index.php
+++ b/comment/index.php
@@ -61,7 +61,7 @@ if ($action === 'delete') {
die;
} else {
if ($manager->delete_comment($commentid)) {
- redirect($CFG->httpswwwroot.'/comment/');
+ redirect($CFG->wwwroot.'/comment/');
} else {
$err = 'cannotdeletecomment';
}
@@ -81,7 +81,7 @@ echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('comments'));
echo $OUTPUT->box_start('generalbox commentsreport');
if (!empty($err)) {
- print_error($err, 'error', $CFG->httpswwwroot.'/comment/');
+ print_error($err, 'error', $CFG->wwwroot.'/comment/');
}
if (empty($action)) {
echo '