From: Matěj Suchánek Date: Fri, 29 Jun 2018 07:14:15 +0000 (+0000) Subject: Mark rollbacking revision as patrolled X-Git-Tag: 1.34.0-rc.0~4921 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=49aa0841134a90ddbac2f24599045195eeae2a6b;p=lhc%2Fweb%2Fwiklou.git Mark rollbacking revision as patrolled I just copy & pasted lines 1833-1838. Bug: T198449 Change-Id: I5d356b074e048a2325a64bfe2c1e652c640c560f --- 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 ),