$request = $this->getRequest();
$out->addModuleStyles( 'mediawiki.special' );
- $this->mTarget = is_null( $par )
- ? $request->getVal( 'wpTarget', $request->getVal( 'target', '' ) )
- : $par;
+ $this->mTarget = $par ?? $request->getVal( 'wpTarget', $request->getVal( 'target', '' ) );
// Make sure, that HTMLForm uses the correct target.
$request->setVal( 'wpTarget', $this->mTarget );
* @param User $user
* @param string $editToken Edit token
* @param Config|null $config optional for backwards compatibility
- * @return string|null Null on success or string on error
+ * @return null|string|array Null on success, string on error, or array on
+ * hook error
*/
public static function getPermissionsError( $user, $editToken, Config $config = null ) {
if ( $config === null ) {
* Form to ask for target user name.
*
* @param string $name User name submitted.
- * @return string Form asking for user name.
*/
protected function userForm( $name ) {
$htmlForm = HTMLForm::factory( 'ooui', [
if ( $data['CCMe'] && $to != $from ) {
$ccTo = $from;
$ccFrom = $from;
- $ccSubject = $context->msg( 'emailccsubject' )->rawParams(
+ $ccSubject = $context->msg( 'emailccsubject' )->plaintextParams(
$target->getName(), $subject )->text();
$ccText = $text;