Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -99,6 +99,8 @@ |
100 | 100 | * (bug 28897) rvparse doesn’t seem to work with rvsection |
101 | 101 | * (bug 25734) API: possible issue with revids validation |
102 | 102 | * (bug 28002) Internal error in ApiFormatRaw::getMimeType |
| 103 | +* (bug 26597) Allow toggling of persistent cookies ("remember me") in API |
| 104 | + action=login |
103 | 105 | |
104 | 106 | === Languages updated in 1.19 === |
105 | 107 | |
Index: trunk/phase3/includes/api/ApiLogin.php |
— | — | @@ -60,9 +60,12 @@ |
61 | 61 | 'wpPassword' => $params['password'], |
62 | 62 | 'wpDomain' => $params['domain'], |
63 | 63 | 'wpLoginToken' => $params['token'], |
64 | | - 'wpRemember' => '' |
65 | 64 | ) ); |
66 | 65 | |
| 66 | + if ( $params['rememberme'] ) { |
| 67 | + $req['wpRemember'] = ''; |
| 68 | + } |
| 69 | + |
67 | 70 | // Init session if necessary |
68 | 71 | if ( session_id() == '' ) { |
69 | 72 | wfSetupSession(); |
— | — | @@ -168,6 +171,10 @@ |
169 | 172 | 'password' => null, |
170 | 173 | 'domain' => null, |
171 | 174 | 'token' => null, |
| 175 | + 'rememberme' => array( |
| 176 | + ApiBase::PARAM_TYPE => 'boolean', |
| 177 | + ApiBase::PARAM_DFLT => true, |
| 178 | + ), |
172 | 179 | ); |
173 | 180 | } |
174 | 181 | |
— | — | @@ -177,6 +184,7 @@ |
178 | 185 | 'password' => 'Password', |
179 | 186 | 'domain' => 'Domain (optional)', |
180 | 187 | 'token' => 'Login token obtained in first request', |
| 188 | + 'rememberme' => 'Make the cookies persistant' |
181 | 189 | ); |
182 | 190 | } |
183 | 191 | |