From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/api/ApiLogin.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) (limited to 'includes/api/ApiLogin.php') diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index aa570cbc..1f91fe92 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -4,7 +4,7 @@ * * Created on Sep 19, 2006 * - * Copyright © 2006-2007 Yuri Astrakhan @gmail.com, + * Copyright © 2006-2007 Yuri Astrakhan "@gmail.com", * Daniel Cannon (cannon dot danielc at gmail dot com) * * This program is free software; you can redistribute it and/or modify @@ -79,6 +79,8 @@ class ApiLogin extends ApiBase { $user->setOption( 'rememberpassword', 1 ); $user->setCookies( $this->getRequest() ); + ApiQueryInfo::resetTokenCache(); + // Run hooks. // @todo FIXME: Split back and frontend from this hook. // @todo FIXME: This hook should be placed in the backend @@ -181,6 +183,66 @@ class ApiLogin extends ApiBase { ); } + public function getResultProperties() { + return array( + '' => array( + 'result' => array( + ApiBase::PROP_TYPE => array( + 'Success', + 'NeedToken', + 'WrongToken', + 'NoName', + 'Illegal', + 'WrongPluginPass', + 'NotExists', + 'WrongPass', + 'EmptyPass', + 'CreateBlocked', + 'Throttled', + 'Blocked', + 'Aborted' + ) + ), + 'lguserid' => array( + ApiBase::PROP_TYPE => 'integer', + ApiBase::PROP_NULLABLE => true + ), + 'lgusername' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'lgtoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'cookieprefix' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'sessionid' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'token' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'details' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'wait' => array( + ApiBase::PROP_TYPE => 'integer', + ApiBase::PROP_NULLABLE => true + ), + 'reason' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ) + ) + ); + } + public function getDescription() { return array( 'Log in and get the authentication tokens. ', -- cgit v1.2.3-54-g00ecf