resourceloader: Minor optimisation in variable declarations
[lhc/web/wiklou.git] / languages / Language.php
index 445e6cb..bbf2576 100644 (file)
@@ -245,7 +245,7 @@ class Language {
                        // It's not possible to customise this code with class files, so
                        // just return a Language object. This is to support uselang= hacks.
                        $lang = new Language;
-                       $lang->setCode( $code );
+                       $lang->mCode = $code;
                        return $lang;
                }
 
@@ -267,7 +267,7 @@ class Language {
                        $class = self::classFromCode( $fallbackCode );
                        if ( class_exists( $class ) ) {
                                $lang = new $class;
-                               $lang->setCode( $code );
+                               $lang->mCode = $code;
                                return $lang;
                        }
                }
@@ -4331,32 +4331,6 @@ class Language {
                $this->mConverter->updateConversionTable( $title );
        }
 
-       /**
-        * Prepare external link text for conversion. When the text is
-        * a URL, it shouldn't be converted, and it'll be wrapped in
-        * the "raw" tag (-{R| }-) to prevent conversion.
-        *
-        * This function is called "markNoConversion" for historical
-        * reasons *BUT DIFFERS SIGNIFICANTLY* from
-        * LanguageConverter::markNoConversion(), with which it is easily
-        * confused.
-        *
-        * @param string $text Text to be used for external link
-        * @param bool $noParse Wrap it without confirming it's a real URL first
-        * @return string The tagged text
-        * @deprecated since 1.32, use LanguageConverter::markNoConversion()
-        *  instead.
-        */
-       public function markNoConversion( $text, $noParse = false ) {
-               wfDeprecated( __METHOD__, '1.32' );
-               // Excluding protocal-relative URLs may avoid many false positives.
-               if ( $noParse || preg_match( '/^(?:' . wfUrlProtocolsWithoutProtRel() . ')/', $text ) ) {
-                       return $this->mConverter->markNoConversion( $text );
-               } else {
-                       return $text;
-               }
-       }
-
        /**
         * A regular expression to match legal word-trailing characters
         * which should be merged onto a link of the form [[foo]]bar.
@@ -4449,6 +4423,7 @@ class Language {
         * @deprecated since 1.32, use Language::factory to create a new object instead.
         */
        public function setCode( $code ) {
+               wfDeprecated( __METHOD__, '1.32' );
                $this->mCode = $code;
                // Ensure we don't leave incorrect cached data lying around
                $this->mHtmlCode = null;