API: action=login now returns the correct waiting time in the details property
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 14 Apr 2008 13:27:30 +0000 (13:27 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 14 Apr 2008 13:27:30 +0000 (13:27 +0000)
RELEASE-NOTES
includes/api/ApiLogin.php

index 28546b4..3abb9d1 100644 (file)
@@ -225,6 +225,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13618) Added rcprop=redirect and rcshow=redirect to list=recentchanges
 * (bug 13544) Added oldid parameter to action=parse to allow for parsing of old revisions
 * (bug 13718) Return the proper continue parameter for cmsort=timestamp
+* action=login now returns the correct waiting time in the details property
 
 === Languages updated in 1.13 ===
 
index e67de4a..6ecf464 100644 (file)
@@ -135,8 +135,9 @@ class ApiLogin extends ApiBase {
                }
 
                if ($result['result'] != 'Success') {
-                       $result['wait'] = $this->cacheBadLogin();
-                       $result['details'] = "Please wait " . self::THROTTLE_TIME . " seconds before next log-in attempt";
+                       $delay = $this->cacheBadLogin();
+                       $result['wait'] = $delay;
+                       $result['details'] = "Please wait " . $delay . " seconds before next log-in attempt";
                }
                // if we were allowed to try to login, memcache is fine