diff --git a/admin/settings/appearance.php b/admin/settings/appearance.php index e89c09a1f90..6cfd6c70adc 100644 --- a/admin/settings/appearance.php +++ b/admin/settings/appearance.php @@ -294,7 +294,6 @@ reports,core_reportbuilder|/reportbuilder/index.php', $ADMIN->add('appearance', $temp); $temp = new admin_settingpage('ajax', new lang_string('ajaxuse')); - $temp->add(new admin_setting_configcheckbox('useexternalyui', new lang_string('useexternalyui', 'admin'), new lang_string('configuseexternalyui', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('yuicomboloading', new lang_string('yuicomboloading', 'admin'), new lang_string('configyuicomboloading', 'admin'), 1)); $setting = new admin_setting_configcheckbox('cachejs', new lang_string('cachejs', 'admin'), new lang_string('cachejs_help', 'admin'), 1); $setting->set_updatedcallback('js_reset_all_caches'); diff --git a/lang/en/admin.php b/lang/en/admin.php index 17be3b3dfda..1871b913c6d 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -390,7 +390,6 @@ $string['configthemelist'] = 'Leave this blank to allow any valid theme to be us For example: standard,orangewhite.'; $string['configtimezone'] = 'This is the default timezone for displaying dates - each user can override this setting in their profile. Cron tasks and other server settings are specified in this timezone. You should change the setting if it shows as "Invalid timezone"'; $string['configuseblogassociations'] = 'Should users be able to organize their blog by associating entries with courses and course modules?'; -$string['configuseexternalyui'] = 'Instead of using local files, use online files available on Yahoo‘s servers. WARNING: This requires an internet connection, or no AJAX will work on your site. This setting is not compatible with sites using https.'; $string['configusesitenameforsitepages'] = 'If enabled the site\'s short name will be used for the site pages node in the navigation rather than the string \'Site pages\'.'; $string['configusetags'] = 'Should tags functionality across the site be enabled?'; $string['configvariables'] = 'Variables'; @@ -1509,7 +1508,6 @@ $string['upgradinglogs'] = 'Upgrading logs'; $string['upgradingversion'] = 'Upgrading to new version'; $string['upwards'] = 'upwards'; $string['useblogassociations'] = 'Enable associations'; -$string['useexternalyui'] = 'Use online YUI libraries'; $string['user'] = 'User'; $string['userbulk'] = 'Bulk user actions'; $string['userbulkdownload'] = 'Export users as'; diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 7de36e44385..efb482fe377 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3064,5 +3064,13 @@ privatefiles,moodle|/user/files.php'; upgrade_main_savepoint(true, 2022121600.01); } + if ($oldversion < 2023010300.00) { + // The useexternalyui setting has been removed. + unset_config('useexternalyui'); + + // Main savepoint reached. + upgrade_main_savepoint(true, 2023010300.00); + } + return true; } diff --git a/lib/outputrequirementslib.php b/lib/outputrequirementslib.php index b744d1691e6..e6e02ba8292 100644 --- a/lib/outputrequirementslib.php +++ b/lib/outputrequirementslib.php @@ -180,23 +180,12 @@ class page_requirements_manager { $this->yui3loader = new stdClass(); $this->YUI_config = new YUI_config(); - if (is_https() && !empty($CFG->useexternalyui)) { - // On HTTPS sites all JS must be loaded from https sites, - // YUI CDN does not support https yet, sorry. - $CFG->useexternalyui = 0; - } - // Set up some loader options. $this->yui3loader->local_base = $CFG->wwwroot . '/lib/yuilib/'. $CFG->yui3version . '/'; $this->yui3loader->local_comboBase = $CFG->wwwroot . '/theme/yui_combo.php'.$sep; - if (!empty($CFG->useexternalyui)) { - $this->yui3loader->base = 'http://yui.yahooapis.com/' . $CFG->yui3version . '/'; - $this->yui3loader->comboBase = 'http://yui.yahooapis.com/combo?'; - } else { - $this->yui3loader->base = $this->yui3loader->local_base; - $this->yui3loader->comboBase = $this->yui3loader->local_comboBase; - } + $this->yui3loader->base = $this->yui3loader->local_base; + $this->yui3loader->comboBase = $this->yui3loader->local_comboBase; // Enable combo loader? This significantly helps with caching and performance! $this->yui3loader->combine = !empty($CFG->yuicomboloading); @@ -219,7 +208,7 @@ class page_requirements_manager { $configname = $this->YUI_config->set_config_source('lib/yui/config/yui2.js'); $this->YUI_config->add_group('yui2', array( - // Loader configuration for our 2in3, for now ignores $CFG->useexternalyui. + // Loader configuration for our 2in3. 'base' => $CFG->wwwroot . '/lib/yuilib/2in3/' . $CFG->yui2version . '/build/', 'comboBase' => $CFG->wwwroot . '/theme/yui_combo.php'.$sep, 'combine' => $this->yui3loader->combine, diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 2de8ef1b884..0636506166b 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -14,6 +14,9 @@ information provided here is intended especially for developers. * New DB parameter 'versionfromdb', only available for MySQL and MariaDB drivers. It allows to force the DB version to be evaluated through an explicit call to VERSION() to skip the PHP client version which appears to be sometimes fooled by the underlying infrastructure, e.g. PaaS on Azure. +* The useexternalyui configuration setting has been removed as a part of the migration away from YUI. + It only worked with http sites and did not officially support SSL, and is at risk of disappearing should Yahoo! decide + to remove it. === 4.1 === diff --git a/version.php b/version.php index ffb6a44ede7..0bf8760cb57 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2022122900.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2023010300.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '4.2dev (Build: 20221229)'; // Human-friendly version name