$out->addModules( [ 'mediawiki.special.userrights' ] );
- if ( $par !== null ) {
- $this->mTarget = $par;
- } else {
- $this->mTarget = $request->getVal( 'user' );
- }
+ $this->mTarget = $par ?? $request->getVal( 'user' );
if ( is_string( $this->mTarget ) ) {
$this->mTarget = trim( $this->mTarget );
// save settings
if ( !$fetchedStatus->isOK() ) {
- $this->getOutput()->addWikiText( $fetchedStatus->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface( $fetchedStatus->getWikiText() );
return;
}
return;
} else {
// Print an error message and redisplay the form
- $out->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
+ $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
}
}
}
function editUserGroupsForm( $username ) {
$status = $this->fetchUser( $username, true );
if ( !$status->isOK() ) {
- $this->getOutput()->addWikiText( $status->getWikiText() );
+ $this->getOutput()->addWikiTextAsInterface( $status->getWikiText() );
return;
} else {
)->escaped();
$grouplist = '';
- $count = count( $list );
+ $count = count( $list ) + count( $tempList );
if ( $count > 0 ) {
$grouplist = $this->msg( 'userrights-groupsmember' )
->numParams( $count )