X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialMostlinkedcategories.php;h=956207f883a56e71b7f3972c54245e1b3a6ebb5a;hb=020739639ad42a1c9f3c13d1bdadb4bb3bca2a2c;hp=3ead08ad41f41aec372aa551d21eba0b1c3bab92;hpb=ff2dfbe9420b2ae8a942e1b6c3baa554d4a0a513;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialMostlinkedcategories.php b/includes/specials/SpecialMostlinkedcategories.php index 3ead08ad41..956207f883 100644 --- a/includes/specials/SpecialMostlinkedcategories.php +++ b/includes/specials/SpecialMostlinkedcategories.php @@ -24,6 +24,9 @@ * @author Ævar Arnfjörð Bjarmason */ +use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IDatabase; + /** * A querypage to show categories ordered in descending order by the pages in them * @@ -59,18 +62,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 ); } /**