X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMostlinkedtemplates.php;h=f5c2c5fb504489127e1ebd0a8a000f3074486244;hb=900843f7ee9131ebdbe839fafffb70b8e293a8b9;hp=950241f4fbe7bc4eee0261e4e804339dedf2af28;hpb=fb7b3eebeb8de47eb42e8d6ccf204106a2d6d9e4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index 950241f4fb..f5c2c5fb50 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -22,6 +22,8 @@ * @author Rob Church */ +use Wikimedia\Rdbms\ResultWrapper; + /** * Special page lists templates with a large number of * transclusion links, i.e. "most used" templates @@ -79,17 +81,7 @@ class MostlinkedTemplatesPage extends QueryPage { * @param ResultWrapper $res */ public function preprocessResults( $db, $res ) { - if ( !$res->numRows() ) { - return; - } - - $batch = new LinkBatch(); - foreach ( $res as $row ) { - $batch->add( $row->namespace, $row->title ); - } - $batch->execute(); - - $res->seek( 0 ); + $this->executeLBFromResultWrapper( $res ); } /** @@ -114,7 +106,7 @@ class MostlinkedTemplatesPage extends QueryPage { } return $this->getLanguage()->specialList( - Linker::link( $title ), + $this->getLinkRenderer()->makeLink( $title ), $this->makeWlhLink( $title, $result ) ); } @@ -128,9 +120,9 @@ class MostlinkedTemplatesPage extends QueryPage { */ private function makeWlhLink( $title, $result ) { $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() ); - $label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped(); + $label = $this->msg( 'ntransclusions' )->numParams( $result->value )->text(); - return Linker::link( $wlh, $label ); + return $this->getLinkRenderer()->makeLink( $wlh, $label ); } protected function getGroupName() {