From: Brion Vibber Date: Sat, 9 Apr 2011 19:57:35 +0000 (+0000) Subject: Followup to r85706 and friends: now that Math messages have been moved to extension... X-Git-Tag: 1.31.0-rc.0~30958 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8ee5e020542da99d7bdaf27ad5c2b0bb47cac6a8;p=lhc%2Fweb%2Fwiklou.git Followup to r85706 and friends: now that Math messages have been moved to extension, move out the settings list and constants. * MW_MATH_* constants are now defined in Math extension * Language::getMathNames() is removed * mathNames section in message files is removed * A hardcoded preference override in refreshLinks moved to MaintenanceRefreshLinksInit hook --- diff --git a/includes/Defines.php b/includes/Defines.php index 693bd447a3..b4a8d7b41d 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -95,17 +95,6 @@ $wgFeedClasses = array( 'atom' => 'AtomFeed', ); -/**@{ - * Maths constants - */ -define( 'MW_MATH_PNG', 0 ); -define( 'MW_MATH_SIMPLE', 1 ); -define( 'MW_MATH_HTML', 2 ); -define( 'MW_MATH_SOURCE', 3 ); -define( 'MW_MATH_MODERN', 4 ); -define( 'MW_MATH_MATHML', 5 ); -/**@}*/ - /**@{ * Cache type */ diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index e98710420a..9d006819cc 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -81,7 +81,7 @@ class LocalisationCache { * All item keys */ static public $allKeys = array( - 'fallback', 'namespaceNames', 'mathNames', 'bookstoreList', + 'fallback', 'namespaceNames', 'bookstoreList', 'magicWords', 'messages', 'rtl', 'capitalizeAllNouns', 'digitTransformTable', 'separatorTransformTable', 'fallback8bitEncoding', 'linkPrefixExtension', 'defaultUserOptionOverrides', 'linkTrail', 'namespaceAliases', @@ -94,7 +94,7 @@ class LocalisationCache { * Keys for items which consist of associative arrays, which may be merged * by a fallback sequence. */ - static public $mergeableMapKeys = array( 'messages', 'namespaceNames', 'mathNames', + static public $mergeableMapKeys = array( 'messages', 'namespaceNames', 'dateFormats', 'defaultUserOptionOverrides', 'imageFiles', 'preloadedMessages', ); diff --git a/languages/Language.php b/languages/Language.php index 8e62c3b1b6..8974ca5dce 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -495,10 +495,6 @@ class Language { ); } - function getMathNames() { - return self::$dataCache->getItem( $this->mCode, 'mathNames' ); - } - function getDatePreferences() { return self::$dataCache->getItem( $this->mCode, 'datePreferences' ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 262a675de2..2a65c2a6ef 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -121,18 +121,6 @@ $namespaceGenderAliases = array( */ $namespaceGenderAliases = array(); -/** - * Deprecated, use the message array - */ -$mathNames = array( - MW_MATH_PNG => 'mw_math_png', - MW_MATH_SIMPLE => 'mw_math_simple', - MW_MATH_HTML => 'mw_math_html', - MW_MATH_SOURCE => 'mw_math_source', - MW_MATH_MODERN => 'mw_math_modern', - MW_MATH_MATHML => 'mw_math_mathml' -); - /** * A list of date format preference keys which can be selected in user * preferences. New preference keys can be added, provided they are supported diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php index eee4dc5931..03bfbe75fd 100644 --- a/maintenance/refreshLinks.php +++ b/maintenance/refreshLinks.php @@ -66,8 +66,8 @@ class RefreshLinks extends Maintenance { $dbr = wfGetDB( DB_SLAVE ); $start = intval( $start ); - # Don't generate TeX PNGs (lack of a sensible current directory causes errors anyway) - $wgUser->setOption( 'math', MW_MATH_SOURCE ); + // Give extensions a chance to optimize settings + wfRunHooks( 'MaintenanceRefreshLinksInit', array( $this ) ); # Don't generate extension images (e.g. Timeline) $wgParser->clearTagHooks();