summaryrefslogtreecommitdiff
path: root/includes/api
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-04-07 04:33:59 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-04-07 04:33:59 +0200
commit03e45da6f96fd9aa411e015554f559b3ee9a61da (patch)
tree4936acbffcd395763235288a09bfd5576d16d3ff /includes/api
parent6f5403ca6e8561c3dcd19284f86b4c3c8dd715ff (diff)
update to MediaWiki 1.15.3
Diffstat (limited to 'includes/api')
-rw-r--r--includes/api/ApiLogin.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index bc477e1d..1d2c3436 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -60,6 +60,7 @@ class ApiLogin extends ApiBase {
'wpName' => $params['name'],
'wpPassword' => $params['password'],
'wpDomain' => $params['domain'],
+ 'wpLoginToken' => $params['token'],
'wpRemember' => ''
));
@@ -88,6 +89,15 @@ class ApiLogin extends ApiBase {
$result['cookieprefix'] = $wgCookiePrefix;
$result['sessionid'] = session_id();
break;
+
+ case LoginForm::NEED_TOKEN:
+ $result['result'] = 'NeedToken';
+ $result['token'] = $loginForm->getLoginToken();
+ break;
+
+ case LoginForm::WRONG_TOKEN:
+ $result['result'] = 'WrongToken';
+ break;
case LoginForm :: NO_NAME :
$result['result'] = 'NoName';
@@ -133,7 +143,8 @@ class ApiLogin extends ApiBase {
return array (
'name' => null,
'password' => null,
- 'domain' => null
+ 'domain' => null,
+ 'token' => null,
);
}
@@ -141,7 +152,8 @@ class ApiLogin extends ApiBase {
return array (
'name' => 'User Name',
'password' => 'Password',
- 'domain' => 'Domain (optional)'
+ 'domain' => 'Domain (optional)',
+ 'token' => 'Login token obtained in first request',
);
}
@@ -162,6 +174,6 @@ class ApiLogin extends ApiBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiLogin.php 48091 2009-03-06 13:49:44Z catrope $';
+ return __CLASS__ . ': $Id: ApiLogin.php 64680 2010-04-07 00:13:46Z tstarling $';
}
}