Followup to r85706 and friends: now that Math messages have been moved to extension...
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 9 Apr 2011 19:57:35 +0000 (19:57 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 9 Apr 2011 19:57:35 +0000 (19:57 +0000)
* 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

includes/Defines.php
includes/LocalisationCache.php
languages/Language.php
languages/messages/MessagesEn.php
maintenance/refreshLinks.php

index 693bd44..b4a8d7b 100644 (file)
@@ -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
  */
index e987104..9d00681 100644 (file)
@@ -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',
        );
index 8e62c3b..8974ca5 100644 (file)
@@ -495,10 +495,6 @@ class Language {
                );
        }
 
-       function getMathNames() {
-               return self::$dataCache->getItem( $this->mCode, 'mathNames' );
-       }
-
        function getDatePreferences() {
                return self::$dataCache->getItem( $this->mCode, 'datePreferences' );
        }
index 262a675..2a65c2a 100644 (file)
@@ -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
index eee4dc5..03bfbe7 100644 (file)
@@ -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();