API: Added uiprop=preferencestoken to meta=userinfo, to retrieve the token for chanin...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 25 Sep 2008 15:20:37 +0000 (15:20 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 25 Sep 2008 15:20:37 +0000 (15:20 +0000)
RELEASE-NOTES
includes/api/ApiQueryUserInfo.php

index 9ea3c29..72b9d1a 100644 (file)
@@ -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 ===
 
index 3ad9177..bc4a94d 100644 (file)
@@ -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'
                                )