From a8d26127ea50a534c96f3f5dc57656687d189f56 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 12 Jul 2019 16:30:07 -0700 Subject: [PATCH] Drop remnants of wgHtml5/wgJsMimeType/wgXhtmlDefaultNamespace support, killed in 1.22 Change-Id: I6bb849543fb3cfd50a4d99bb6a69e228913b9def --- RELEASE-NOTES-1.34 | 4 ++++ includes/DefaultSettings.php | 27 --------------------------- includes/Setup.php | 6 ------ includes/skins/SkinTemplate.php | 3 +-- tests/parser/ParserTestRunner.php | 1 - 5 files changed, 5 insertions(+), 36 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index ac10762054..44f69c7ea8 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -277,6 +277,10 @@ because of Phabricator reports. AuthChangeFormFields hook or security levels instead. * WikiMap::getWikiIdFromDomain(), deprecated in 1.33, has been removed. Use WikiMap::getWikiIdFromDbDomain() instead. +* The config variables $wgHtml5, $wgJsMimeType, and $wgXhtmlDefaultNamespace, + which were deprecated and ignored by core since 1.22, are no longer set to any + value, and SkinTemplate no longer emits a 'jsmimetype' key. Any extensions not + updated since 2013 to cope with this deprecation may now break. * … === Deprecations in 1.34 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5bf6163859..3bfc8f8241 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3277,33 +3277,6 @@ $wgOverrideUcfirstCharacters = []; */ $wgMimeType = 'text/html'; -/** - * Previously used as content type in HTML script tags. This is now ignored since - * HTML5 doesn't require a MIME type for script tags (javascript is the default). - * It was also previously used by RawAction to determine the ctype query parameter - * value that will result in a javascript response. - * @deprecated since 1.22 - */ -$wgJsMimeType = null; - -/** - * The default xmlns attribute. The option to define this has been removed. - * The value of this variable is no longer used by core and is set to a fixed - * value in Setup.php for compatibility with extensions that depend on the value - * of this variable being set. Such a dependency however is deprecated. - * @deprecated since 1.22 - */ -$wgXhtmlDefaultNamespace = null; - -/** - * Previously used to determine if we should output an HTML5 doctype. - * This is no longer used as we always output HTML5 now. For compatibility with - * extensions that still check the value of this config it's value is now forced - * to true by Setup.php. - * @deprecated since 1.22 - */ -$wgHtml5 = true; - /** * Defines the value of the version attribute in the <html> tag, if any. * diff --git a/includes/Setup.php b/includes/Setup.php index d6f390a1aa..45a2456c97 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -585,12 +585,6 @@ if ( $wgUseFileCache || $wgUseCdn ) { $wgDebugToolbar = false; } -// We always output HTML5 since 1.22, overriding these is no longer supported -// we set them here for extensions that depend on its value. -$wgHtml5 = true; -$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; -$wgJsMimeType = 'text/javascript'; - // Blacklisted file extensions shouldn't appear on the "allowed" list $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) ); diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 5d6197e7ac..6ddced4ed7 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -256,7 +256,7 @@ class SkinTemplate extends Skin { * @return QuickTemplate The template to be executed by outputPage */ protected function prepareQuickTemplate() { - global $wgScript, $wgStylePath, $wgMimeType, $wgJsMimeType, + global $wgScript, $wgStylePath, $wgMimeType, $wgSitename, $wgLogo, $wgMaxCredits, $wgShowCreditsIfMax, $wgArticlePath, $wgScriptPath, $wgServer; @@ -306,7 +306,6 @@ class SkinTemplate extends Skin { } $tpl->set( 'mimetype', $wgMimeType ); - $tpl->set( 'jsmimetype', $wgJsMimeType ); $tpl->set( 'charset', 'UTF-8' ); $tpl->set( 'wgScript', $wgScript ); $tpl->set( 'skinname', $this->skinname ); diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index f284b13f31..f29b0d794f 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -279,7 +279,6 @@ class ParserTestRunner { $setup['wgNoFollowDomainExceptions'] = [ 'no-nofollow.org' ]; $setup['wgExternalLinkTarget'] = false; $setup['wgLocaltimezone'] = 'UTC'; - $setup['wgHtml5'] = true; $setup['wgDisableLangConversion'] = false; $setup['wgDisableTitleConversion'] = false; -- 2.20.1