(bug 12952) Using Nosuchusershort instead of Nosuchuser when account creatio is disabled
authorHuji <huji@users.mediawiki.org>
Thu, 7 Feb 2008 09:54:12 +0000 (09:54 +0000)
committerHuji <huji@users.mediawiki.org>
Thu, 7 Feb 2008 09:54:12 +0000 (09:54 +0000)
RELEASE-NOTES
includes/SpecialUserlogin.php

index 00dc9fa..319c291 100644 (file)
@@ -372,6 +372,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 12931) Fix wrong global variable in SpecialVersion
 * (bug 12919) Use 'deletedrevision' message as content when deleting an old file
   version
+* (bug 12952) Using Nosuchusershort instead of Nosuchuser when account creation
+  is disabled
 
 == Parser changes in 1.12 ==
 
index 02bb1fe..72ccad3 100644 (file)
@@ -471,7 +471,11 @@ class LoginForm {
                                $this->mainLoginForm( wfMsg( 'wrongpassword' ) );
                                break;
                        case self::NOT_EXISTS:
-                               $this->mainLoginForm( wfMsg( 'nosuchuser', htmlspecialchars( $this->mName ) ) );
+                               if( $wgUser->isAllowed( 'createaccount' ) ){
+                                       $this->mainLoginForm( wfMsg( 'nosuchuser', htmlspecialchars( $this->mName ) ) );
+                               } else {
+                                       $this->mainLoginForm( wfMsg( 'nosuchusershort', htmlspecialchars( $this->mName ) ) );
+                               }
                                break;
                        case self::WRONG_PASS:
                                $this->mainLoginForm( wfMsg( 'wrongpassword' ) );