Merge "Parser: Make makeKnownLinkHolder() protected, and remove $query handling"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 May 2016 23:04:53 +0000 (23:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 May 2016 23:04:53 +0000 (23:04 +0000)
includes/parser/Parser.php

index 8f55f01..17098f7 100644 (file)
@@ -2354,7 +2354,7 @@ class Parser {
                        # batch file existence checks for NS_FILE and NS_MEDIA
                        if ( $iw == '' && $nt->isAlwaysKnown() ) {
                                $this->mOutput->addLink( $nt );
-                               $s .= $this->makeKnownLinkHolder( $nt, $text, [], $trail, $prefix );
+                               $s .= $this->makeKnownLinkHolder( $nt, $text, $trail, $prefix );
                        } else {
                                # Links will be added to the output link list after checking
                                $s .= $holders->makeHolder( $nt, $text, [], $trail, $prefix );
@@ -2372,23 +2372,19 @@ class Parser {
         *
         * @param Title $nt
         * @param string $text
-        * @param array|string $query
         * @param string $trail
         * @param string $prefix
         * @return string HTML-wikitext mix oh yuck
         */
-       public function makeKnownLinkHolder( $nt, $text = '', $query = [], $trail = '', $prefix = '' ) {
+       protected function makeKnownLinkHolder( $nt, $text = '', $trail = '', $prefix = '' ) {
                list( $inside, $trail ) = Linker::splitTrail( $trail );
 
-               if ( is_string( $query ) ) {
-                       $query = wfCgiToArray( $query );
-               }
                if ( $text == '' ) {
                        $text = htmlspecialchars( $nt->getPrefixedText() );
                }
 
                $link = $this->getLinkRenderer()->makeKnownLink(
-                       $nt, new HtmlArmor( "$prefix$text$inside" ), [], $query
+                       $nt, new HtmlArmor( "$prefix$text$inside" )
                );
 
                return $this->armorLinks( $link ) . $trail;