Index: trunk/phase3/includes/actions/HistoryAction.php |
— | — | @@ -385,8 +385,13 @@ |
386 | 386 | $this->mResult->seek( 0 ); |
387 | 387 | $batch = new LinkBatch(); |
388 | 388 | foreach ( $this->mResult as $row ) { |
389 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
390 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 389 | + if( !is_null( $row->user_name ) ) { |
| 390 | + $batch->add( NS_USER, $row->user_name ); |
| 391 | + $batch->add( NS_USER_TALK, $row->user_name ); |
| 392 | + } else { # for anons or usernames of imported revisions |
| 393 | + $batch->add( NS_USER, $row->rev_user_text ); |
| 394 | + $batch->add( NS_USER_TALK, $row->rev_user_text ); |
| 395 | + } |
391 | 396 | } |
392 | 397 | $batch->execute(); |
393 | 398 | $this->mResult->seek( 0 ); |
— | — | @@ -568,13 +573,10 @@ |
569 | 574 | $s .= ' ' . ChangesList::flag( 'minor' ); |
570 | 575 | } |
571 | 576 | |
572 | | - if ( $prevRev |
573 | | - && !$prevRev->isDeleted( Revision::DELETED_TEXT ) |
574 | | - && !$rev->isDeleted( Revision::DELETED_TEXT ) ) |
575 | | - { |
576 | | - $sDiff = ChangesList::showCharacterDifference( $prevRev->getSize(), $rev->getSize() ); |
577 | | - $s .= ' . . ' . $sDiff . ' . . '; |
578 | | - } |
| 577 | + # Size is always public data |
| 578 | + $prevSize = $prevRev ? $prevRev->getSize() : 0; |
| 579 | + $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() ); |
| 580 | + $s .= ' . . ' . $sDiff . ' . . '; |
579 | 581 | |
580 | 582 | $s .= Linker::revComment( $rev, false, true ); |
581 | 583 | |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -511,9 +511,9 @@ |
512 | 512 | $filterSelection . |
513 | 513 | Xml::closeElement( 'tr' ) . |
514 | 514 | Xml::openElement( 'tr' ) . |
515 | | - $extraOptions . |
516 | | - Xml::closeElement( 'tr' ) . |
517 | | - Xml::openElement( 'tr' ) . |
| 515 | + $extraOptions . |
| 516 | + Xml::closeElement( 'tr' ) . |
| 517 | + Xml::openElement( 'tr' ) . |
518 | 518 | $dateSelectionAndSubmit . |
519 | 519 | Xml::closeElement( 'tr' ) . |
520 | 520 | Xml::closeElement( 'table' ); |
— | — | @@ -677,23 +677,26 @@ |
678 | 678 | $this->mResult->rewind(); |
679 | 679 | $revIds = array(); |
680 | 680 | foreach ( $this->mResult as $row ) { |
681 | | - $revIds[] = $row->rev_parent_id; |
| 681 | + if( $row->rev_parent_id ) { |
| 682 | + $revIds[] = $row->rev_parent_id; |
| 683 | + } |
682 | 684 | } |
683 | 685 | $this->mParentLens = $this->getParentLengths( $revIds ); |
684 | 686 | $this->mResult->rewind(); // reset |
685 | 687 | |
686 | | - if ( $this->contribs === 'newbie' ) { // multiple users |
687 | | - # Do a link batch query |
688 | | - $this->mResult->seek( 0 ); |
689 | | - $batch = new LinkBatch(); |
690 | | - # Give some pointers to make (last) links |
691 | | - foreach ( $this->mResult as $row ) { |
692 | | - $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) ); |
693 | | - $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) ); |
| 688 | + # Do a link batch query |
| 689 | + $this->mResult->seek( 0 ); |
| 690 | + $batch = new LinkBatch(); |
| 691 | + # Give some pointers to make (last) links |
| 692 | + foreach ( $this->mResult as $row ) { |
| 693 | + if ( $this->contribs === 'newbie' ) { // multiple users |
| 694 | + $batch->add( NS_USER, $row->user_name ); |
| 695 | + $batch->add( NS_USER_TALK, $row->user_name ); |
694 | 696 | } |
695 | | - $batch->execute(); |
696 | | - $this->mResult->seek( 0 ); |
| 697 | + $batch->add( $row->page_namespace, $row->page_title ); |
697 | 698 | } |
| 699 | + $batch->execute(); |
| 700 | + $this->mResult->seek( 0 ); |
698 | 701 | } |
699 | 702 | |
700 | 703 | /** |
— | — | @@ -789,12 +792,9 @@ |
790 | 793 | array( 'action' => 'history' ) |
791 | 794 | ); |
792 | 795 | |
793 | | - if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) { |
794 | | - $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
795 | | - $this->mParentLens[$row->rev_parent_id], $row->rev_len ) . ' . . '; |
796 | | - } else { |
797 | | - $chardiff = ' '; |
798 | | - } |
| 796 | + $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0; |
| 797 | + $chardiff = ' . . ' . ChangesList::showCharacterDifference( |
| 798 | + $parentLen, $row->rev_len ) . ' . . '; |
799 | 799 | |
800 | 800 | $lang = $this->getLanguage(); |
801 | 801 | $comment = $lang->getDirMark() . Linker::revComment( $rev, false, true ); |