Addition of 'APIQuerySiteInfoGeneralInfo' hook for usage in bug 16288 "API: consider...
authorSam Reed <reedy@users.mediawiki.org>
Sun, 20 Mar 2011 13:31:22 +0000 (13:31 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 20 Mar 2011 13:31:22 +0000 (13:31 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/api/ApiQuerySiteinfo.php

index 78c8d67..3d05272 100644 (file)
@@ -271,6 +271,8 @@ PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 27343) Add parseddescription to list=filearchive
 * (bug 27469) label implicit groups in list=allusers&auprop=groups/
   list=users&usprop=groups
+* Addition of APIQuerySiteInfoGeneralInfo hook to add extra information to
+  the general site info results
 
 === Languages updated in 1.18 ===
 
index a30bf9f..7a68a64 100644 (file)
@@ -354,6 +354,11 @@ associated RecentChange object. In the hook, just add your callback to the
 $tokenFunctions array and return true (returning false makes no sense)
 $tokenFunctions: array(action => callback)
 
+'APIQuerySiteInfoGeneralInfo': use this hook to add extra information to
+the sites general information.
+$module: the current ApiQuerySiteInfo module
+$resutls: 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
index 651e013..06e1a71 100644 (file)
@@ -160,6 +160,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                $data['wikiid'] = wfWikiID();
                $data['time'] = wfTimestamp( TS_ISO_8601, time() );
 
+               wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( &$this, &$data ) );
+
                return $this->getResult()->addValue( 'query', $property, $data );
        }