X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMostinterwikis.php;h=8560dca35722c5eb80b619ca571b8b7093b5deb2;hb=900843f7ee9131ebdbe839fafffb70b8e293a8b9;hp=8271d165b6bc274259c8b37f2a5dc6703528c739;hpb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMostinterwikis.php b/includes/specials/SpecialMostinterwikis.php index 8271d165b6..8560dca357 100644 --- a/includes/specials/SpecialMostinterwikis.php +++ b/includes/specials/SpecialMostinterwikis.php @@ -24,6 +24,8 @@ * @author Umherirrender */ +use Wikimedia\Rdbms\ResultWrapper; + /** * A special page that listed pages that have highest interwiki count * @@ -75,20 +77,7 @@ class MostinterwikisPage extends QueryPage { * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { - # There's no point doing a batch check if we aren't caching results; - # the page must exist for it to have been pulled out of the table - if ( !$this->isCached() || !$res->numRows() ) { - return; - } - - $batch = new LinkBatch; - foreach ( $res as $row ) { - $batch->add( $row->namespace, $row->title ); - } - $batch->execute(); - - // Back to start for display - $res->seek( 0 ); + $this->executeLBFromResultWrapper( $res ); } /** @@ -110,10 +99,11 @@ class MostinterwikisPage extends QueryPage { ); } + $linkRenderer = $this->getLinkRenderer(); if ( $this->isCached() ) { - $link = Linker::link( $title ); + $link = $linkRenderer->makeLink( $title ); } else { - $link = Linker::linkKnown( $title ); + $link = $linkRenderer->makeKnownLink( $title ); } $count = $this->msg( 'ninterwikis' )->numParams( $result->value )->escaped();