Merge "Set context on RedirectSpecialPage in MediaWiki.php"
[lhc/web/wiklou.git] / languages / LanguageConverter.php
index 5f1dca4..4eeba64 100644 (file)
@@ -1053,24 +1053,12 @@ class LanguageConverter {
        }
 
        /**
-        * Hook to refresh the cache of conversion tables when
+        * Refresh the cache of conversion tables when
         * MediaWiki:Conversiontable* is updated.
-        * @private
         *
-        * @param WikiPage $page
-        * @param User $user User object for the current user
-        * @param Content $content New page content
-        * @param string $summary Edit summary of the edit
-        * @param bool $isMinor Was the edit marked as minor?
-        * @param null $isWatch Unused.
-        * @param null $section Unused.
-        * @param int $flags Bitfield
-        * @param Revision|null $revision New Revision object or null
-        * @return bool True
+        * @param Title $titleobj The Title of the page being updated
         */
-       function OnPageContentSaveComplete( $page, $user, $content, $summary, $isMinor,
-                       $isWatch, $section, $flags, $revision ) {
-               $titleobj = $page->getTitle();
+       public function updateConversionTable( Title $titleobj ) {
                if ( $titleobj->getNamespace() == NS_MEDIAWIKI ) {
                        $title = $titleobj->getDBkey();
                        $t = explode( '/', $title, 3 );
@@ -1081,23 +1069,6 @@ class LanguageConverter {
                                }
                        }
                }
-               return true;
-       }
-
-       /**
-        * Armour rendered math against conversion.
-        * Escape special chars in parsed math text. (in most cases are img elements)
-        *
-        * @param string $text Text to armour against conversion
-        * @return string Armoured text where { and } have been converted to
-        *   { and }
-        * @deprecated since 1.22 is no longer used
-        */
-       public function armourMath( $text ) {
-               // convert '-{' and '}-' to '-{' and '}-' to prevent
-               // any unwanted markup appearing in the math image tag.
-               $text = strtr( $text, array( '-{' => '-{', '}-' => '}-' ) );
-               return $text;
        }
 
        /**
@@ -1110,13 +1081,13 @@ class LanguageConverter {
                        // text should be splited by ";" only if a valid variant
                        // name exist after the markup, for example:
                        //  -{zh-hans:<span style="font-size:120%;">xxx</span>;zh-hant:\
-                       //      <span style="font-size:120%;">yyy</span>;}-
+                       //      <span style="font-size:120%;">yyy</span>;}-
                        // we should split it as:
                        //  array(
-                       //        [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
-                       //        [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
-                       //        [2] => ''
-                       //       )
+                       //        [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
+                       //        [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
+                       //        [2] => ''
+                       //       )
                        $pat = '/;\s*(?=';
                        foreach ( $this->mVariants as $variant ) {
                                // zh-hans:xxx;zh-hant:yyy