}
}
- $retval = $rc->doMarkPatrolled( $this->getUser() );
+ $user = $this->getUser();
+ $tags = $params['tags'];
+
+ // Check if user can add tags
+ if ( !is_null( $tags ) ) {
+ $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $tags, $user );
+ if ( !$ableToTag->isOK() ) {
+ $this->dieStatus( $ableToTag );
+ }
+ }
+
+ $retval = $rc->doMarkPatrolled( $user, false, $tags );
if ( $retval ) {
$this->dieUsageMsg( reset( $retval ) );
'revid' => [
ApiBase::PARAM_TYPE => 'integer'
],
+ 'tags' => [
+ ApiBase::PARAM_TYPE => 'tags',
+ ApiBase::PARAM_ISMULTI => true,
+ ],
];
}