Index: trunk/phase3/includes/api/ApiLogin.php |
— | — | @@ -130,11 +130,15 @@ |
131 | 131 | case LoginForm :: EMPTY_PASS : |
132 | 132 | $result['result'] = 'EmptyPass'; |
133 | 133 | break; |
| 134 | + case LoginForm :: CREATE_BLOCKED : |
| 135 | + $result['result'] = 'CreateBlocked'; |
| 136 | + $result['details'] = 'Your IP address is blocked from account creation'; |
| 137 | + break; |
134 | 138 | default : |
135 | 139 | ApiBase :: dieDebug(__METHOD__, 'Unhandled case value'); |
136 | 140 | } |
137 | 141 | |
138 | | - if ($result['result'] != 'Success') { |
| 142 | + if ($result['result'] != 'Success' && !isset( $result['details'] ) ) { |
139 | 143 | $delay = $this->cacheBadLogin(); |
140 | 144 | $result['wait'] = $delay; |
141 | 145 | $result['details'] = "Please wait " . $delay . " seconds before next log-in attempt"; |
— | — | @@ -219,7 +223,7 @@ |
220 | 224 | return wfMemcKey( 'apilogin', 'badlogin', 'ip', wfGetIP() ); |
221 | 225 | } |
222 | 226 | |
223 | | - public function mustBePosted() { return true; } |
| 227 | + //public function mustBePosted() { return true; } |
224 | 228 | |
225 | 229 | public function getAllowedParams() { |
226 | 230 | return array ( |