From: Roan Kattouw Date: Thu, 25 Sep 2008 15:20:37 +0000 (+0000) Subject: API: Added uiprop=preferencestoken to meta=userinfo, to retrieve the token for chanin... X-Git-Tag: 1.31.0-rc.0~45096 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=09ccd3adbe3309cf9127bd75a3dd2a0eeda99e15;p=lhc%2Fweb%2Fwiklou.git API: Added uiprop=preferencestoken to meta=userinfo, to retrieve the token for chaning one's preferences through Special:Preferences (and possibly through a future API module if and when the preferences system doesn't suck so much anymore). --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9ea3c29861..72b9d1ae42 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -273,6 +273,7 @@ The following extensions are migrated into MediaWiki 1.14: WDDX formatter to resemble PHP's more * (bug 15706) Empty values for apprtype and apprlevel are now silently ignored rather than causing an exception +* Added uiprop=preferencestoken to meta=userinfo === Languages updated in 1.14 === diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 3ad9177aa8..bc4a94dfd9 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -82,6 +82,9 @@ class ApiQueryUserInfo extends ApiQueryBase { if (isset($this->prop['options'])) { $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions); } + if (isset($this->prop['preferencestoken'])) { + $vals['preferencestoken'] = $wgUser->editToken(); + } if (isset($this->prop['editcount'])) { $vals['editcount'] = $wgUser->getEditCount(); } @@ -134,6 +137,7 @@ class ApiQueryUserInfo extends ApiQueryBase { 'groups', 'rights', 'options', + 'preferencestoken', 'editcount', 'ratelimits' )