diff --git a/admin/cli/install.php b/admin/cli/install.php index ea7157157a2..cfc8ea0f01a 100644 --- a/admin/cli/install.php +++ b/admin/cli/install.php @@ -157,6 +157,7 @@ $CFG->lang = 'en'; $CFG->dirroot = dirname(dirname(__DIR__)); $CFG->libdir = "$CFG->dirroot/lib"; $CFG->wwwroot = "http://localhost"; +$CFG->httpswwwroot = $CFG->wwwroot; $CFG->docroot = 'http://docs.moodle.org'; $CFG->running_installer = true; $CFG->early_install_lang = true; @@ -388,6 +389,7 @@ if ($interactive) { } } $CFG->wwwroot = $wwwroot; +$CFG->httpswwwroot = $CFG->wwwroot; //We need dataroot before lang download $CFG->dataroot = $options['dataroot']; diff --git a/install.php b/install.php index d2c2f501e6a..973f8334e0c 100644 --- a/install.php +++ b/install.php @@ -160,6 +160,7 @@ $CFG->lang = $config->lang; $CFG->dirroot = __DIR__; $CFG->libdir = "$CFG->dirroot/lib"; $CFG->wwwroot = install_guess_wwwroot(); // can not be changed - ppl must use the real address when installing +$CFG->httpswwwroot = $CFG->wwwroot; $CFG->dataroot = $config->dataroot; $CFG->tempdir = $CFG->dataroot.'/temp'; $CFG->backuptempdir = $CFG->tempdir.'/backup'; diff --git a/lib/phpunit/tests/basic_test.php b/lib/phpunit/tests/basic_test.php index 0e97ae2e013..04b75c5caee 100644 --- a/lib/phpunit/tests/basic_test.php +++ b/lib/phpunit/tests/basic_test.php @@ -52,6 +52,10 @@ class core_phpunit_basic_testcase extends basic_testcase { */ public function test_bootstrap() { global $CFG; + + // The httpswwwroot has been deprecated, we keep it as an alias for backwards compatibility with plugins only. + $this->assertTrue(isset($CFG->httpswwwroot)); + $this->assertEquals($CFG->httpswwwroot, $CFG->wwwroot); $this->assertEquals($CFG->prefix, $CFG->phpunit_prefix); } diff --git a/lib/setup.php b/lib/setup.php index c9f2c5d054d..4b6588aa3db 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -534,6 +534,9 @@ global $FULLSCRIPT; */ global $SCRIPT; +// The httpswwwroot has been deprecated, we keep it as an alias for backwards compatibility with plugins only. +$CFG->httpswwwroot = $CFG->wwwroot; + require_once($CFG->libdir .'/setuplib.php'); // Functions that MUST be loaded first if (NO_OUTPUT_BUFFERING) { diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 9ade5075a08..b65a321b348 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -26,8 +26,6 @@ information provided here is intended especially for developers. independently of local files (MDL-66304). * The methods get_local_path_from_storedfile and get_remote_path_from_storedfile in lib/filestore/file_system.php are now public. If you are overriding these then you will need to change your methods to public in your class. -* $CFG->httpswwwroot has been removed. It is no longer necessary as loginhttps has already been removed and it's no longer being - used anywhere in core. * It is now possible to use sub-directories for AMD modules. The standard rules for Level 2 namespaces also apply to AMD modules. The sub-directory used must be either an valid component, or placed inside a 'local' directory to ensure that it does not conflict with other components.