From: Kunal Mehta Date: Mon, 22 Jul 2013 09:44:03 +0000 (-0700) Subject: Possible error messages for action=createaccount should be in English and not show... X-Git-Tag: 1.31.0-rc.0~19146^2 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=ca7940324596c3ab336030de462342b635e2dfca;p=lhc%2Fweb%2Fwiklou.git Possible error messages for action=createaccount should be in English and not show local modifications Bug: 47791 Change-Id: Id55f65d1a7b9b2d6a17da0b87bffe42ceb4231ef --- diff --git a/includes/api/ApiCreateAccount.php b/includes/api/ApiCreateAccount.php index 9464d49a2a..201634db35 100644 --- a/includes/api/ApiCreateAccount.php +++ b/includes/api/ApiCreateAccount.php @@ -250,7 +250,7 @@ class ApiCreateAccount extends ApiBase { $errors = parent::getPossibleErrors(); // All local errors are from LoginForm, which means they're actually message keys. foreach ( $localErrors as $error ) { - $errors[] = array( 'code' => $error, 'info' => wfMessage( $error )->parse() ); + $errors[] = array( 'code' => $error, 'info' => wfMessage( $error )->inLanguage( 'en' )->useDatabase( false )->parse() ); } $errors[] = array( @@ -274,7 +274,7 @@ class ApiCreateAccount extends ApiBase { global $wgMinimalPasswordLength; $errors[] = array( 'code' => 'passwordtooshort', - 'info' => wfMessage( 'passwordtooshort', $wgMinimalPasswordLength )->parse() + 'info' => wfMessage( 'passwordtooshort', $wgMinimalPasswordLength )->inLanguage( 'en' )->useDatabase( false )->parse() ); return $errors; }