From 49aa0841134a90ddbac2f24599045195eeae2a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mat=C4=9Bj=20Such=C3=A1nek?= Date: Fri, 29 Jun 2018 07:14:15 +0000 Subject: [PATCH] Mark rollbacking revision as patrolled I just copy & pasted lines 1833-1838. Bug: T198449 Change-Id: I5d356b074e048a2325a64bfe2c1e652c640c560f --- includes/page/WikiPage.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 18ecff42b3..ecb113bbf8 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2962,6 +2962,13 @@ class WikiPage implements Page, IDBAccessObject { $updater->setUndidRevisionId( $current->getId() ); $updater->addTags( $tags ); + // TODO: this logic should not be in the storage layer, it's here for compatibility + // with 1.31 behavior. Applying the 'autopatrol' right should be done in the same + // place the 'bot' right is handled, which is currently in EditPage::attemptSave. + if ( $wgUseRCPatrol && $this->getTitle()->userCan( 'autopatrol', $guser ) ) { + $updater->setRcPatrolStatus( RecentChange::PRC_AUTOPATROLLED ); + } + // Actually store the rollback $rev = $updater->saveRevision( CommentStoreComment::newUnsavedComment( $summary ), -- 2.20.1