FU r101629, made Pager only call doBatchLookups() if there are rows
This commit is contained in:
parent
385809fee2
commit
c8575ffd7a
2 changed files with 8 additions and 10 deletions
|
|
@ -329,9 +329,12 @@ abstract class IndexPager extends ContextSource implements Pager {
|
|||
if ( !$this->mQueryDone ) {
|
||||
$this->doQuery();
|
||||
}
|
||||
# Do any special query batches before display
|
||||
$this->doBatchLookups();
|
||||
|
||||
|
||||
if ( $this->mResult->numRows() ) {
|
||||
# Do any special query batches before display
|
||||
$this->doBatchLookups();
|
||||
}
|
||||
|
||||
# Don't use any extra rows returned by the query
|
||||
$numRows = min( $this->mResult->numRows(), $this->mLimit );
|
||||
|
||||
|
|
@ -389,8 +392,8 @@ abstract class IndexPager extends ContextSource implements Pager {
|
|||
|
||||
/**
|
||||
* Called from getBody(), before getStartBody() is called and
|
||||
* after doQuery() was called. This will be called even if there
|
||||
* are no rows in the result set.
|
||||
* after doQuery() was called. This will be called only if there
|
||||
* are rows in the result set.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -385,11 +385,6 @@ class HistoryPager extends ReverseChronologicalPager {
|
|||
}
|
||||
|
||||
function doBatchLookups() {
|
||||
# No results? Nothing to batch
|
||||
if ( !$this->mResult->numRows() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
# Do a link batch query
|
||||
$this->mResult->seek( 0 );
|
||||
$batch = new LinkBatch();
|
||||
|
|
|
|||
Loading…
Reference in a new issue