diff --git a/admin/cli/install.php b/admin/cli/install.php index e9203ec1121..2dea6ca083c 100644 --- a/admin/cli/install.php +++ b/admin/cli/install.php @@ -157,7 +157,6 @@ $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; @@ -389,8 +388,6 @@ if ($interactive) { } } $CFG->wwwroot = $wwwroot; -$CFG->httpswwwroot = $CFG->wwwroot; - //We need dataroot before lang download $CFG->dataroot = $options['dataroot']; diff --git a/admin/tool/mobile/tests/externallib_test.php b/admin/tool/mobile/tests/externallib_test.php index f3d1815eec2..6bfea7f165e 100644 --- a/admin/tool/mobile/tests/externallib_test.php +++ b/admin/tool/mobile/tests/externallib_test.php @@ -71,7 +71,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase { $expected = 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/install.php b/install.php index 973f8334e0c..d2c2f501e6a 100644 --- a/install.php +++ b/install.php @@ -160,7 +160,6 @@ $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/db/upgrade.php b/lib/db/upgrade.php index 048ae58cb56..5fa4433bd47 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3416,5 +3416,11 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2019070400.01); } + if ($oldversion < 2019072200.00) { + unset_config('httpswwwroot'); + + upgrade_main_savepoint(true, 2019072200.00); + } + return true; } diff --git a/lib/phpunit/tests/basic_test.php b/lib/phpunit/tests/basic_test.php index 9989a8ce513..0e97ae2e013 100644 --- a/lib/phpunit/tests/basic_test.php +++ b/lib/phpunit/tests/basic_test.php @@ -52,9 +52,6 @@ class core_phpunit_basic_testcase extends basic_testcase { */ public function test_bootstrap() { global $CFG; - // The use of httpswwwroot is deprecated, but we are still setting it for backwards compatibility. - $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 2cf12822c6d..521c25bfe60 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -534,10 +534,6 @@ global $FULLSCRIPT; */ global $SCRIPT; -// Set httpswwwroot to $CFG->wwwroot for backwards compatibility -// The loginhttps option is deprecated, so httpswwwroot is no longer necessary. See MDL-42834. -$CFG->httpswwwroot = $CFG->wwwroot; - require_once($CFG->libdir .'/setuplib.php'); // Functions that MUST be loaded first if (NO_OUTPUT_BUFFERING) { diff --git a/lib/tests/outputcomponents_test.php b/lib/tests/outputcomponents_test.php index 958a70b9e69..b782f11d4a9 100644 --- a/lib/tests/outputcomponents_test.php +++ b/lib/tests/outputcomponents_test.php @@ -245,7 +245,6 @@ class core_outputcomponents_testcase extends advanced_testcase { // TODO MDL-44792 Rewrite those tests to use a fixture. // Now test gravatar with one theme having own images (afterburner). - // $CFG->httpswwwroot = $CFG->wwwroot; // $this->assertFileExists("$CFG->dirroot/theme/afterburner/config.php"); // set_config('theme', 'afterburner'); // $page = new moodle_page(); @@ -256,9 +255,6 @@ class core_outputcomponents_testcase extends advanced_testcase { // $up2 = new user_picture($user2); // $this->assertEquals('http://www.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?s=35&d=http%3A%2F%2Fwww.example.com%2Fmoodle%2Ftheme%2Fafterburner%2Fpix_core%2Fu%2Ff2.png', $up2->get_url($page, $renderer)->out(false)); - // // Https version. - // $CFG->httpswwwroot = str_replace('http:', 'https:', $CFG->wwwroot); - // $up2 = new user_picture($user2); // $this->assertSame('https://secure.gravatar.com/avatar/ab53a2911ddf9b4817ac01ddcd3d975f?s=35&d=https%3A%2F%2Fwww.example.com%2Fmoodle%2Ftheme%2Fafterburner%2Fpix_core%2Fu%2Ff2.png', $up2->get_url($page, $renderer)->out(false)); // End of gravatar tests. @@ -267,7 +263,6 @@ class core_outputcomponents_testcase extends advanced_testcase { // set_config('enablegravatar', 0); // $this->assertFileExists("$CFG->dirroot/theme/formal_white/config.php"); // Use any other theme. // set_config('theme', 'formal_white'); - // $CFG->httpswwwroot = $CFG->wwwroot; // $page = new moodle_page(); // $page->set_url('/user/profile.php'); // $page->set_context(context_system::instance()); diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 80d4cc1e6dd..91792cf95e8 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -22,6 +22,8 @@ information provided here is intended especially for developers. at least a single checkbox item is selected or not. * Final deprecation (removal) of the core/modal_confirm dialogue. * Upgrade scssphp to v1.0.2, This involves renaming classes from Leafo => ScssPhp as the repo has changed. +* $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. === 3.7 === diff --git a/version.php b/version.php index 572c371c5b2..01b0f6dfd8f 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2019071800.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2019072200.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.