API: Added uiprop=editcount to meta=userinfo
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Jan 2008 20:13:58 +0000 (20:13 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 23 Jan 2008 20:13:58 +0000 (20:13 +0000)
RELEASE-NOTES
includes/api/ApiQueryUserInfo.php

index 4ab1ee8..65d6e37 100644 (file)
@@ -464,6 +464,7 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API
 * (bug 12718) Added action=paraminfo module that provides information about API modules and their parameters
 * Added iiurlwidth and iiurlheight parameters to prop=imageinfo
 * Added format=txt and format=dbg, imported from query.php
+* Added uiprop=editcount to meta=userinfo
 
 === Languages updated in 1.12 ===
 
index 6857ca7..ca8d5da 100644 (file)
@@ -73,6 +73,9 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        if (isset($prop['options'])) {
                                $vals['options'] = (is_null($wgUser->mOptions) ? User::getDefaultOptions() : $wgUser->mOptions);
                        }
+                       if (isset($prop['editcount'])) {
+                               $vals['editcount'] = $wgUser->getEditCount();
+                       }
                }
                
                $result->addValue("query", $this->getModuleName(), $vals);
@@ -88,7 +91,8 @@ class ApiQueryUserInfo extends ApiQueryBase {
                                        'hasmsg',
                                        'groups',
                                        'rights',
-                                       'options'
+                                       'options',
+                                       'editcount'
                                ))
                );
        }
@@ -101,7 +105,8 @@ class ApiQueryUserInfo extends ApiQueryBase {
                                '  hasmsg    - adds a tag "message" if user has pending messages',
                                '  groups    - lists all the groups the current user belongs to',
                                '  rights    - lists of all rights the current user has',
-                               '  options   - lists all preferences the current user has set'
+                               '  options   - lists all preferences the current user has set',
+                               '  editcount - adds the user\'s edit count'
                        )
                );
        }