Remove deprecated Language::markNoConversion
authorFomafix <fomafix@googlemail.com>
Sat, 2 Mar 2019 11:14:28 +0000 (12:14 +0100)
committerFomafix <fomafix@googlemail.com>
Fri, 8 Mar 2019 17:43:53 +0000 (18:43 +0100)
Language::markNoConversion was hard-deprecated in 7de2c566d included in
1.32.

Change-Id: I2cc200d7a814e73d9c6138860190f44232a6bd3c

RELEASE-NOTES-1.33
languages/Language.php

index cff2853..b9331bc 100644 (file)
@@ -282,6 +282,8 @@ because of Phabricator reports.
     AuthManagerAuthPlugin, and AuthManagerAuthPluginUser.
   * The $wgAuth configuration setting and its use in Setup.php and unit tests
 * (T217772) The 'wgAvailableSkins' mw.config key in JavaScript, was removed.
+* Language::markNoConversion, deprecated in 1.32, has been removed. Use
+  LanguageConverter::markNoConversion instead.
 
 === Deprecations in 1.33 ===
 * The configuration option $wgUseESI has been deprecated, and is expected
index 3dbde01..bbf2576 100644 (file)
@@ -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.