Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -549,6 +549,18 @@ |
550 | 550 | } |
551 | 551 | |
552 | 552 | function doBatchLookups() { |
| 553 | + global $wgRCShowChangedSize; |
| 554 | + |
| 555 | + $this->mParentLens = array(); |
| 556 | + if ( $wgRCShowChangedSize ) { |
| 557 | + $this->mResult->rewind(); |
| 558 | + $revIds = array(); |
| 559 | + foreach ( $this->mResult as $row ) { |
| 560 | + $revIds[] = $row->rev_parent_id; |
| 561 | + } |
| 562 | + $this->mParentLens = $this->getParentLengths( $revIds ); |
| 563 | + $this->mResult->rewind(); // reset |
| 564 | + } |
553 | 565 | if ( $this->contribs === 'newbie' ) { // multiple users |
554 | 566 | # Do a link batch query |
555 | 567 | $this->mResult->seek( 0 ); |
— | — | @@ -563,32 +575,6 @@ |
564 | 576 | } |
565 | 577 | } |
566 | 578 | |
567 | | - function getStartBody() { |
568 | | - return "<ul>\n"; |
569 | | - } |
570 | | - |
571 | | - function getEndBody() { |
572 | | - return "</ul>\n"; |
573 | | - } |
574 | | - |
575 | | - function getBody() { |
576 | | - global $wgRCShowChangedSize; |
577 | | - if( !$this->mQueryDone ) { |
578 | | - $this->doQuery(); |
579 | | - } |
580 | | - $this->mParentLens = array(); |
581 | | - if( $wgRCShowChangedSize ) { |
582 | | - $this->mResult->rewind(); |
583 | | - $revIds = array(); |
584 | | - foreach( $this->mResult as $row ) { |
585 | | - $revIds[] = $row->rev_parent_id; |
586 | | - } |
587 | | - $this->mParentLens = $this->getParentLengths( $revIds ); |
588 | | - $this->mResult->rewind(); |
589 | | - } |
590 | | - return parent::getBody(); |
591 | | - } |
592 | | - |
593 | 579 | /* |
594 | 580 | * Do a batched query to get the parent revision lengths |
595 | 581 | */ |
— | — | @@ -609,6 +595,14 @@ |
610 | 596 | return $revLens; |
611 | 597 | } |
612 | 598 | |
| 599 | + function getStartBody() { |
| 600 | + return "<ul>\n"; |
| 601 | + } |
| 602 | + |
| 603 | + function getEndBody() { |
| 604 | + return "</ul>\n"; |
| 605 | + } |
| 606 | + |
613 | 607 | /** |
614 | 608 | * Generates each row in the contributions list. |
615 | 609 | * |
Index: trunk/phase3/includes/Pager.php |
— | — | @@ -388,8 +388,9 @@ |
389 | 389 | } |
390 | 390 | |
391 | 391 | /** |
392 | | - * Called from getBody(), before getStartBody() is called. This |
393 | | - * will be called even if there are no rows in the result set. |
| 392 | + * 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. |
394 | 395 | * |
395 | 396 | * @return void |
396 | 397 | */ |