From 24c478b815585a32fd9c4441f8a3ff59e505db59 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 23 Jan 2008 20:13:58 +0000 Subject: [PATCH] API: Added uiprop=editcount to meta=userinfo --- RELEASE-NOTES | 1 + includes/api/ApiQueryUserInfo.php | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4ab1ee8153..65d6e37f9e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 6857ca7dbd..ca8d5da81a 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -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' ) ); } -- 2.20.1