$targetUser->clearInstanceCache(); // T40989
}
- if ( $request->getVal( 'conflictcheck-originalgroups' )
- !== implode( ',', $targetUser->getGroups() )
- ) {
- $out->addWikiMsg( 'userrights-conflict' );
+ $conflictCheck = $request->getVal( 'conflictcheck-originalgroups' );
+ $conflictCheck = ( $conflictCheck === '' ) ? [] : explode( ',', $conflictCheck );
+ $userGroups = $targetUser->getGroups();
+
+ if ( $userGroups !== $conflictCheck ) {
+ $out->wrapWikiMsg( '<span class="error">$1</span>', 'userrights-conflict' );
} else {
$status = $this->saveUserGroups(
$this->mTarget,
->rawParams( $userToolLinks )->parse()
);
if ( $canChangeAny ) {
- $conf = $this->getConfig();
- $oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
$this->getOutput()->addHTML(
$this->msg( 'userrights-groups-help', $user->getName() )->parse() .
$grouplist .
'id' => 'wpReason',
// HTML maxlength uses "UTF-16 code units", which means that characters outside BMP
// (e.g. emojis) count for two each. This limit is overridden in JS to instead count
- // Unicode codepoints (or 255 UTF-8 bytes for old schema).
- 'maxlength' => $oldCommentSchema ? 255 : CommentStore::COMMENT_CHARACTER_LIMIT,
+ // Unicode codepoints.
+ 'maxlength' => CommentStore::COMMENT_CHARACTER_LIMIT,
] ) .
"</td>
</tr>