X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListredirects.php;h=2df48347293fda8b3c7b52fb1c2b418cd2c09b5a;hb=145f1c1bb4dfa6e173bdd5dcbabfedbe91722daf;hp=2c8792ff6f89296f377ff7d336af6984c14da9b7;hpb=71c0d39d12f140eb49757c991e063daec34b000f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 2c8792ff6f..2df4834729 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -72,24 +72,23 @@ class ListredirectsPage extends QueryPage { /** * Cache page existence for performance * - * @param DatabaseBase $db + * @param IDatabase $db * @param ResultWrapper $res */ function preprocessResults( $db, $res ) { - $batch = new LinkBatch; + if ( !$res->numRows() ) { + return; + } + $batch = new LinkBatch; foreach ( $res as $row ) { $batch->add( $row->namespace, $row->title ); $batch->addObj( $this->getRedirectTarget( $row ) ); } - $batch->execute(); // Back to start for display - if ( $res->numRows() > 0 ) { - // If there are no rows we get an error seeking. - $db->dataSeek( $res, 0 ); - } + $res->seek( 0 ); } protected function getRedirectTarget( $row ) {