Merge "Don't modify $wgHooks on language object construction"
[lhc/web/wiklou.git] / languages / classes / LanguageIu.php
index 4c956f0..93cc2c8 100644 (file)
@@ -21,8 +21,6 @@
  * @ingroup Language
  */
 
-require_once __DIR__ . '/../LanguageConverter.php';
-
 /**
  * Conversion script between Latin and Syllabics for Inuktitut.
  * - Syllabics -> lowercase Latin
@@ -142,8 +140,8 @@ class IuConverter extends LanguageConverter {
         *     names as they were
         *   - do not try to find variants for usernames
         *
-        * @param string $link
-        * @param Title $nt
+        * @param string &$link
+        * @param Title &$nt
         * @param bool $ignoreOtherCond
         */
        function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
@@ -162,26 +160,6 @@ class IuConverter extends LanguageConverter {
                }
        }
 
-       /**
-        * An ugly function wrapper for parsing Image titles
-        * (to prevent image name conversion)
-        *
-        * @param string $text
-        * @param bool $toVariant
-        *
-        * @return string
-        */
-       function autoConvert( $text, $toVariant = false ) {
-               global $wgTitle;
-               if ( is_object( $wgTitle ) && $wgTitle->getNamespace() == NS_FILE ) {
-                       $imagename = $wgTitle->getNsText();
-                       if ( preg_match( "/^$imagename:/", $text ) ) {
-                               return $text;
-                       }
-               }
-               return parent::autoConvert( $text, $toVariant );
-       }
-
        /**
         * It translates text into variant
         *
@@ -212,8 +190,6 @@ class IuConverter extends LanguageConverter {
  */
 class LanguageIu extends Language {
        function __construct() {
-               global $wgHooks;
-
                parent::__construct();
 
                $variants = array( 'iu', 'ike-cans', 'ike-latn' );
@@ -225,6 +201,5 @@ class LanguageIu extends Language {
 
                $flags = array();
                $this->mConverter = new IuConverter( $this, 'iu', $variants, $variantfallbacks, $flags );
-               $wgHooks['PageContentSaveComplete'][] = $this->mConverter;
        }
 }