r89537 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89536‎ | r89537 | r89538 >
Date:21:50, 5 June 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
* (bug 26597) Allow toggling of persistent cookies ("remember me") in API
action=login
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiLogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -99,6 +99,8 @@
100100 * (bug 28897) rvparse doesn’t seem to work with rvsection
101101 * (bug 25734) API: possible issue with revids validation
102102 * (bug 28002) Internal error in ApiFormatRaw::getMimeType
 103+* (bug 26597) Allow toggling of persistent cookies ("remember me") in API
 104+ action=login
103105
104106 === Languages updated in 1.19 ===
105107
Index: trunk/phase3/includes/api/ApiLogin.php
@@ -60,9 +60,12 @@
6161 'wpPassword' => $params['password'],
6262 'wpDomain' => $params['domain'],
6363 'wpLoginToken' => $params['token'],
64 - 'wpRemember' => ''
6564 ) );
6665
 66+ if ( $params['rememberme'] ) {
 67+ $req['wpRemember'] = '';
 68+ }
 69+
6770 // Init session if necessary
6871 if ( session_id() == '' ) {
6972 wfSetupSession();
@@ -168,6 +171,10 @@
169172 'password' => null,
170173 'domain' => null,
171174 'token' => null,
 175+ 'rememberme' => array(
 176+ ApiBase::PARAM_TYPE => 'boolean',
 177+ ApiBase::PARAM_DFLT => true,
 178+ ),
172179 );
173180 }
174181
@@ -177,6 +184,7 @@
178185 'password' => 'Password',
179186 'domain' => 'Domain (optional)',
180187 'token' => 'Login token obtained in first request',
 188+ 'rememberme' => 'Make the cookies persistant'
181189 );
182190 }
183191

Follow-up revisions

RevisionCommit summaryAuthorDate
r89595Revert r89537 till we decide a sane way to have it on/off as API bools suckreedy19:26, 6 June 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   19:16, 6 June 2011
Error:

ApiUploadTest::testLogin
MWException: Internal error in ApiBase::getParameterFromSettings: Boolean param lgrememberme's default is set to '1'

/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/GlobalFunctions.php:1060
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiBase.php:1205
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiBase.php:735
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiBase.php:530
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiMain.php:565
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiMain.php:663
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/api/ApiMain.php:340
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/api/ApiTestCase.php:41
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/includes/api/ApiUploadTest.php:41
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiTestCase.php:60
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/MediaWikiPHPUnitCommand.php:20
/home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/tests/phpunit/phpunit.php:60

ApiQueryTest

Status & tagging log