$this->mResult->seek( 0 );
$batch = new LinkBatch();
foreach ( $this->mResult as $row ) {
- $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
- $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) );
+ if( !is_null( $row->user_name ) ) {
+ $batch->add( NS_USER, $row->user_name );
+ $batch->add( NS_USER_TALK, $row->user_name );
+ } else { # for anons or usernames of imported revisions
+ $batch->add( NS_USER, $row->rev_user_text );
+ $batch->add( NS_USER_TALK, $row->rev_user_text );
+ }
}
$batch->execute();
$this->mResult->seek( 0 );
$s .= ' ' . ChangesList::flag( 'minor' );
}
- if ( $prevRev
- && !$prevRev->isDeleted( Revision::DELETED_TEXT )
- && !$rev->isDeleted( Revision::DELETED_TEXT ) )
- {
- $sDiff = ChangesList::showCharacterDifference( $prevRev->getSize(), $rev->getSize() );
- $s .= ' . . ' . $sDiff . ' . . ';
- }
+ # Size is always public data
+ $prevSize = $prevRev ? $prevRev->getSize() : 0;
+ $sDiff = ChangesList::showCharacterDifference( $prevSize, $rev->getSize() );
+ $s .= ' . . ' . $sDiff . ' . . ';
$s .= Linker::revComment( $rev, false, true );
$filterSelection .
Xml::closeElement( 'tr' ) .
Xml::openElement( 'tr' ) .
- $extraOptions .
- Xml::closeElement( 'tr' ) .
- Xml::openElement( 'tr' ) .
+ $extraOptions .
+ Xml::closeElement( 'tr' ) .
+ Xml::openElement( 'tr' ) .
$dateSelectionAndSubmit .
Xml::closeElement( 'tr' ) .
Xml::closeElement( 'table' );
$this->mResult->rewind();
$revIds = array();
foreach ( $this->mResult as $row ) {
- $revIds[] = $row->rev_parent_id;
+ if( $row->rev_parent_id ) {
+ $revIds[] = $row->rev_parent_id;
+ }
}
$this->mParentLens = $this->getParentLengths( $revIds );
$this->mResult->rewind(); // reset
- if ( $this->contribs === 'newbie' ) { // multiple users
- # Do a link batch query
- $this->mResult->seek( 0 );
- $batch = new LinkBatch();
- # Give some pointers to make (last) links
- foreach ( $this->mResult as $row ) {
- $batch->addObj( Title::makeTitleSafe( NS_USER, $row->user_name ) );
- $batch->addObj( Title::makeTitleSafe( NS_USER_TALK, $row->user_name ) );
+ # Do a link batch query
+ $this->mResult->seek( 0 );
+ $batch = new LinkBatch();
+ # Give some pointers to make (last) links
+ foreach ( $this->mResult as $row ) {
+ if ( $this->contribs === 'newbie' ) { // multiple users
+ $batch->add( NS_USER, $row->user_name );
+ $batch->add( NS_USER_TALK, $row->user_name );
}
- $batch->execute();
- $this->mResult->seek( 0 );
+ $batch->add( $row->page_namespace, $row->page_title );
}
+ $batch->execute();
+ $this->mResult->seek( 0 );
}
/**
array( 'action' => 'history' )
);
- if ( isset( $this->mParentLens[$row->rev_parent_id] ) ) {
- $chardiff = ' . . ' . ChangesList::showCharacterDifference(
- $this->mParentLens[$row->rev_parent_id], $row->rev_len ) . ' . . ';
- } else {
- $chardiff = ' ';
- }
+ $parentLen = isset( $this->mParentLens[$row->rev_parent_id] ) ? $this->mParentLens[$row->rev_parent_id] : 0;
+ $chardiff = ' . . ' . ChangesList::showCharacterDifference(
+ $parentLen, $row->rev_len ) . ' . . ';
$lang = $this->getLanguage();
$comment = $lang->getDirMark() . Linker::revComment( $rev, false, true );