// Try using the replica DB first, then try the master
$rev = $this->mTitle->getFirstRevision();
if ( !$rev ) {
- $rev = $this->mTitle->getFirstRevision( Title::GAID_FOR_UPDATE );
+ $rev = $this->mTitle->getFirstRevision( Title::READ_LATEST );
}
return $rev;
}
*/
protected function archiveRevisions( $dbw, $id, $suppress ) {
global $wgContentHandlerUseDB, $wgMultiContentRevisionSchemaMigrationStage,
- $wgActorTableSchemaMigrationStage, $wgDeleteRevisionsBatchSize;
+ $wgDeleteRevisionsBatchSize;
// Given the lock above, we can be confident in the title and page ID values
$namespace = $this->getTitle()->getNamespace();
$dbw->delete( 'revision', [ 'rev_id' => $revids ], __METHOD__ );
$dbw->delete( 'revision_comment_temp', [ 'revcomment_rev' => $revids ], __METHOD__ );
- if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) {
- $dbw->delete( 'revision_actor_temp', [ 'revactor_rev' => $revids ], __METHOD__ );
- }
+ $dbw->delete( 'revision_actor_temp', [ 'revactor_rev' => $revids ], __METHOD__ );
// Also delete records from ip_changes as applicable.
if ( count( $ipRevIds ) > 0 ) {
public function commitRollback( $fromP, $summary, $bot,
&$resultDetails, User $guser, $tags = null
) {
- global $wgUseRCPatrol;
+ global $wgUseRCPatrol, $wgDisableAnonTalk;
$dbw = wfGetDB( DB_MASTER );
if ( empty( $summary ) ) {
if ( !$currentEditorForPublic ) { // no public user name
$summary = wfMessage( 'revertpage-nouser' );
+ } elseif ( $wgDisableAnonTalk && $current->getUser() === 0 ) {
+ $summary = wfMessage( 'revertpage-anon' );
} else {
$summary = wfMessage( 'revertpage' );
}