diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/specials/SpecialListredirects.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/specials/SpecialListredirects.php')
-rw-r--r-- | includes/specials/SpecialListredirects.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 2c8792ff..de05be41 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -76,20 +76,19 @@ class ListredirectsPage extends QueryPage { * @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 ) { |