MDL-67250 setup: Revert removal of the httpswwwroot setting

It is still used widely in the plugins that would stop working suddenly
without being warned via a debugging message. We must keep it forever as
an alias for the wwwroot.
This commit is contained in:
David Mudrák
2019-11-13 19:58:10 +01:00
parent 1633a6035d
commit 469d4b7f35
5 changed files with 10 additions and 2 deletions
+2
View File
@@ -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'];
+1
View File
@@ -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';
+4
View File
@@ -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);
}
+3
View File
@@ -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) {
-2
View File
@@ -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.