Index: trunk/phase3/includes/actions/HistoryAction.php |
— | — | @@ -385,11 +385,6 @@ |
386 | 386 | } |
387 | 387 | |
388 | 388 | function doBatchLookups() { |
389 | | - # No results? Nothing to batch |
390 | | - if ( !$this->mResult->numRows() ) { |
391 | | - return; |
392 | | - } |
393 | | - |
394 | 389 | # Do a link batch query |
395 | 390 | $this->mResult->seek( 0 ); |
396 | 391 | $batch = new LinkBatch(); |
Index: trunk/phase3/includes/Pager.php |
— | — | @@ -329,9 +329,12 @@ |
330 | 330 | if ( !$this->mQueryDone ) { |
331 | 331 | $this->doQuery(); |
332 | 332 | } |
333 | | - # Do any special query batches before display |
334 | | - $this->doBatchLookups(); |
335 | | - |
| 333 | + |
| 334 | + if ( $this->mResult->numRows() ) { |
| 335 | + # Do any special query batches before display |
| 336 | + $this->doBatchLookups(); |
| 337 | + } |
| 338 | + |
336 | 339 | # Don't use any extra rows returned by the query |
337 | 340 | $numRows = min( $this->mResult->numRows(), $this->mLimit ); |
338 | 341 | |
— | — | @@ -389,8 +392,8 @@ |
390 | 393 | |
391 | 394 | /** |
392 | 395 | * Called from getBody(), before getStartBody() is called and |
393 | | - * after doQuery() was called. This will be called even if there |
394 | | - * are no rows in the result set. |
| 396 | + * after doQuery() was called. This will be called only if there |
| 397 | + * are rows in the result set. |
395 | 398 | * |
396 | 399 | * @return void |
397 | 400 | */ |