Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/87692
Change subject: Add APIQuerySiteInfoStatisticsInfo hook
......................................................................
Add APIQuerySiteInfoStatisticsInfo hook
Allows extensions to modify the output of
action=query&meta=siteinfo&siprop=statstics
Accompanies the SpecialStatsAddExtra hook for Special:Statistics
Change-Id: I712748077a0ac2fb729bfe3b6616ac4981cb754e
---
M docs/hooks.txt
M includes/api/ApiQuerySiteinfo.php
2 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/92/87692/1
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 2d1001b..74f8b99 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -432,6 +432,11 @@
$module: the current ApiQuerySiteInfo module
&$results: array of results, add things here
+'APIQuerySiteInfoStatisticsInfo': Use this hook to add extra information to the
+sites statistics information.
+$module: the current ApiQuerySiteInfo module
+&$results: array of results, add things here
+
'APIQueryUsersTokens': Use this hook to add custom token to list=users. Every
token has an action, which will be used in the ustoken parameter and in the
output (actiontoken="..."), and a callback function which should return the
diff --git a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index 6aa311e..4031886 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -421,6 +421,9 @@
$data['activeusers'] = intval( SiteStats::activeUsers() );
$data['admins'] = intval( SiteStats::numberingroup( 'sysop' ) );
$data['jobs'] = intval( SiteStats::jobs() );
+
+ wfRunHooks( 'APIQuerySiteInfoStatisticsInfo', array( $this,
&$data ) );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
--
To view, visit https://gerrit.wikimedia.org/r/87692
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I712748077a0ac2fb729bfe3b6616ac4981cb754e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits