Mark edits as patrolled by default if user has permission

Change-Id: Idceb01e51f1caec4b1f2d5def8340c4bdb7ef913
This commit is contained in:
sahajsk 2022-02-19 07:30:48 +05:30 committed by Yaron Koren
parent 03b6e6f9fa
commit 69db621a7d

View file

@ -24,6 +24,7 @@ namespace MediaWiki\Extension\ReplaceText;
use CommentStoreComment;
use Job as JobParent;
use MediaWiki\MediaWikiServices;
use RecentChange;
use RequestContext;
use TextContent;
use Title;
@ -189,6 +190,10 @@ class Job extends JobParent {
$flags |= EDIT_SUPPRESS_RC;
# fixme log this action
}
if ( $permissionManager->userHasRight( $current_user, 'patrol' ) ||
$permissionManager->userHasRight( $current_user, 'autopatrol' ) ) {
$updater->setRcPatrolStatus( RecentChange::PRC_PATROLLED );
}
$updater->saveRevision( $edit_summary, $flags );
}
}