From: Sam Reed Date: Sun, 5 Jun 2011 21:50:49 +0000 (+0000) Subject: * (bug 26597) Allow toggling of persistent cookies ("remember me") in API X-Git-Tag: 1.31.0-rc.0~29688 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=ca167994fb2649013f2e8be41930ef004017b021;p=lhc%2Fweb%2Fwiklou.git * (bug 26597) Allow toggling of persistent cookies ("remember me") in API action=login --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 28a1dae8a3..e7279cdab1 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -99,6 +99,8 @@ production. * (bug 28897) rvparse doesn’t seem to work with rvsection * (bug 25734) API: possible issue with revids validation * (bug 28002) Internal error in ApiFormatRaw::getMimeType +* (bug 26597) Allow toggling of persistent cookies ("remember me") in API + action=login === Languages updated in 1.19 === diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index fa576266c1..ff0a360284 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -60,9 +60,12 @@ class ApiLogin extends ApiBase { 'wpPassword' => $params['password'], 'wpDomain' => $params['domain'], 'wpLoginToken' => $params['token'], - 'wpRemember' => '' ) ); + if ( $params['rememberme'] ) { + $req['wpRemember'] = ''; + } + // Init session if necessary if ( session_id() == '' ) { wfSetupSession(); @@ -168,6 +171,10 @@ class ApiLogin extends ApiBase { 'password' => null, 'domain' => null, 'token' => null, + 'rememberme' => array( + ApiBase::PARAM_TYPE => 'boolean', + ApiBase::PARAM_DFLT => true, + ), ); } @@ -177,6 +184,7 @@ class ApiLogin extends ApiBase { 'password' => 'Password', 'domain' => 'Domain (optional)', 'token' => 'Login token obtained in first request', + 'rememberme' => 'Make the cookies persistant' ); }