mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-30 17:34:14 +00:00
Mark edits as patrolled by default if user has permission
Change-Id: Idceb01e51f1caec4b1f2d5def8340c4bdb7ef913
This commit is contained in:
parent
03b6e6f9fa
commit
69db621a7d
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue