Replace Linker::link() with LinkRenderer in special pages
authorMatěj Suchánek <matejsuchanek97@gmail.com>
Thu, 23 Mar 2017 18:09:41 +0000 (18:09 +0000)
committerLegoktm <legoktm@member.fsf.org>
Tue, 20 Jun 2017 20:44:04 +0000 (20:44 +0000)
Bug: T149346
Change-Id: I2735750803dc1b2e36be3989caaabbf3232b2923

includes/specialpage/PageQueryPage.php
includes/specialpage/WantedQueryPage.php

index 76b1535..f7f0499 100644 (file)
@@ -56,7 +56,7 @@ abstract class PageQueryPage extends QueryPage {
 
                if ( $title instanceof Title ) {
                        $text = $wgContLang->convert( $title->getPrefixedText() );
 
                if ( $title instanceof Title ) {
                        $text = $wgContLang->convert( $title->getPrefixedText() );
-                       return Linker::link( $title, htmlspecialchars( $text ) );
+                       return $this->getLinkRenderer()->makeLink( $title, $text );
                } else {
                        return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ],
                                Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );
                } else {
                        return Html::element( 'span', [ 'class' => 'mw-invalidtitle' ],
                                Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );
index d788f2b..5318895 100644 (file)
@@ -117,8 +117,8 @@ abstract class WantedQueryPage extends QueryPage {
         */
        private function makeWlhLink( $title, $result ) {
                $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
         */
        private function makeWlhLink( $title, $result ) {
                $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
-               $label = $this->msg( 'nlinks' )->numParams( $result->value )->escaped();
-               return Linker::link( $wlh, $label );
+               $label = $this->msg( 'nlinks' )->numParams( $result->value )->text();
+               return $this->getLinkRenderer()->makeLink( $wlh, $label );
        }
 
        /**
        }
 
        /**