Merge "Convert Special:DeletedContributions to use OOUI."
[lhc/web/wiklou.git] / includes / specials / SpecialMostlinkedcategories.php
index b8316f3..41678cb 100644 (file)
@@ -59,18 +59,7 @@ class MostlinkedCategoriesPage extends QueryPage {
         * @param ResultWrapper $res
         */
        function preprocessResults( $db, $res ) {
-               if ( !$res->numRows() ) {
-                       return;
-               }
-
-               $batch = new LinkBatch;
-               foreach ( $res as $row ) {
-                       $batch->add( NS_CATEGORY, $row->title );
-               }
-               $batch->execute();
-
-               // Back to start for display
-               $res->seek( 0 );
+               $this->executeLBFromResultWrapper( $res );
        }
 
        /**
@@ -94,7 +83,7 @@ class MostlinkedCategoriesPage extends QueryPage {
                }
 
                $text = $wgContLang->convert( $nt->getText() );
-               $plink = Linker::link( $nt, htmlspecialchars( $text ) );
+               $plink = $this->getLinkRenderer()->makeLink( $nt, $text );
                $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
 
                return $this->getLanguage()->specialList( $plink, $nlinks );