Brian Wolff has submitted this change and it was merged. Change subject: Avoid empty batch in ListredirectsPage::preprocessResults ......................................................................
Avoid empty batch in ListredirectsPage::preprocessResults Change-Id: Iaf371cdb1c0628a42996537d966165a0d7f92ad7 --- M includes/specials/SpecialListredirects.php 1 file changed, 5 insertions(+), 6 deletions(-) Approvals: Brian Wolff: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialListredirects.php b/includes/specials/SpecialListredirects.php index 2c8792f..de05be4 100644 --- a/includes/specials/SpecialListredirects.php +++ b/includes/specials/SpecialListredirects.php @@ -76,20 +76,19 @@ * @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 ) { -- To view, visit https://gerrit.wikimedia.org/r/95791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf371cdb1c0628a42996537d966165a0d7f92ad7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Brian Wolff <bawolff...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits