Merge "widgets.TitleWidget: Use mediawiki.mixins `.box-sizing()`"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index 3261002..3f0e38f 100644 (file)
@@ -736,17 +736,6 @@ class Parser {
                return $text;
        }
 
-       /**
-        * Get a random string
-        *
-        * @return string
-        * @deprecated since 1.26; use wfRandomString() instead.
-        */
-       public static function getRandomString() {
-               wfDeprecated( __METHOD__, '1.26' );
-               return wfRandomString( 16 );
-       }
-
        /**
         * Set the current user.
         * Should only be used when doing pre-save transform.
@@ -757,17 +746,6 @@ class Parser {
                $this->mUser = $user;
        }
 
-       /**
-        * Accessor for mUniqPrefix.
-        *
-        * @return string
-        * @deprecated since 1.26; use Parser::MARKER_PREFIX instead.
-        */
-       public function uniqPrefix() {
-               wfDeprecated( __METHOD__, '1.26' );
-               return self::MARKER_PREFIX;
-       }
-
        /**
         * Set the context title
         *
@@ -973,14 +951,9 @@ class Parser {
         * @param array $elements List of element names. Comments are always extracted.
         * @param string $text Source text string.
         * @param array &$matches Out parameter, Array: extracted tags
-        * @param string|null $uniq_prefix
         * @return string Stripped text
-        * @since 1.26 The uniq_prefix argument is deprecated.
         */
-       public static function extractTagsAndParams( $elements, $text, &$matches, $uniq_prefix = null ) {
-               if ( $uniq_prefix !== null ) {
-                       wfDeprecated( __METHOD__ . ' called with $prefix argument', '1.26' );
-               }
+       public static function extractTagsAndParams( $elements, $text, &$matches ) {
                static $n = 1;
                $stripped = '';
                $matches = [];
@@ -2323,8 +2296,11 @@ class Parser {
                                                $this->mOutput->addLanguageLink( $nt->getFullText() );
                                        }
 
+                                       /**
+                                        * Strip the whitespace interwiki links produce, see T10897
+                                        */
                                        $s = rtrim( $s . $prefix );
-                                       $s .= trim( $trail, "\n" ) == '' ? '' : $prefix . $trail;
+                                       $s .= rtrim( $trail, "\n" );
                                        continue;
                                }
 
@@ -2349,7 +2325,11 @@ class Parser {
                                                continue;
                                        }
                                } elseif ( $ns == NS_CATEGORY ) {
-                                       $s = rtrim( $s . "\n" ); # T2087
+                                       /**
+                                        * Strip the whitespace Category links produce, see T2087
+                                        */
+                                       $s = rtrim( $s . $prefix ); # T2087, T87753
+                                       $s .= rtrim( $trail, "\n" );
 
                                        if ( $wasblank ) {
                                                $sortkey = $this->getDefaultSort();
@@ -2361,11 +2341,6 @@ class Parser {
                                        $sortkey = $this->getConverterLanguage()->convertCategoryKey( $sortkey );
                                        $this->mOutput->addCategory( $nt->getDBkey(), $sortkey );
 
-                                       /**
-                                        * Strip the whitespace Category links produce, see T2087
-                                        */
-                                       $s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail;
-
                                        continue;
                                }
                        }