Logins: if the error message string doesn't look like a langstring id, don't prepend "user_err_" to it (some auth plugins are not localized at all, this lets them be without ugly cosmetic bugs)
authorDan
Wed, 06 Jan 2010 02:20:53 -0500
changeset 1210 ad49fa34ff3c
parent 1209 944d2fe1fb1e
child 1211 488294ceee13
Logins: if the error message string doesn't look like a langstring id, don't prepend "user_err_" to it (some auth plugins are not localized at all, this lets them be without ugly cosmetic bugs)
includes/clientside/static/login.js
--- a/includes/clientside/static/login.js	Wed Jan 06 02:19:58 2010 -0500
+++ b/includes/clientside/static/login.js	Wed Jan 06 02:20:53 2010 -0500
@@ -1038,7 +1038,7 @@
       case 'login_failure':
         // Generic login user error.
         var error = '', x;
-        if ( (x = $lang.get(response.error)) != response.error )
+        if ( (x = $lang.get(response.error)) != response.error || ! (/^[a-z0-9_]+/).test(response.error) )
           error = x;
         else
           error = $lang.get('user_err_' + response.error);