r84380 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84379‎ | r84380 | r84381 >
Date:13:31, 20 March 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Addition of 'APIQuerySiteInfoGeneralInfo' hook for usage in bug 16288 "API: consider making closure status of wikis more clear with meta=siteinfo"
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -354,6 +354,11 @@
355355 $tokenFunctions array and return true (returning false makes no sense)
356356 $tokenFunctions: array(action => callback)
357357
 358+'APIQuerySiteInfoGeneralInfo': use this hook to add extra information to
 359+the sites general information.
 360+$module: the current ApiQuerySiteInfo module
 361+$resutls: array of results, add things here
 362+
358363 'APIQueryUsersTokens': use this hook to add custom token to list=users.
359364 Every token has an action, which will be used in the ustoken parameter
360365 and in the output (actiontoken="..."), and a callback function which
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -160,6 +160,8 @@
161161 $data['wikiid'] = wfWikiID();
162162 $data['time'] = wfTimestamp( TS_ISO_8601, time() );
163163
 164+ wfRunHooks( 'APIQuerySiteInfoGeneralInfo', array( &$this, &$data ) );
 165+
164166 return $this->getResult()->addValue( 'query', $property, $data );
165167 }
166168
Index: trunk/phase3/RELEASE-NOTES
@@ -271,6 +271,8 @@
272272 * (bug 27343) Add parseddescription to list=filearchive
273273 * (bug 27469) label implicit groups in list=allusers&auprop=groups/
274274 list=users&usprop=groups
 275+* Addition of APIQuerySiteInfoGeneralInfo hook to add extra information to
 276+ the general site info results
275277
276278 === Languages updated in 1.18 ===
277279

Follow-up revisions

RevisionCommit summaryAuthorDate
r84381* (bug 16288) API: consider making closure status of wikis more clear with me...reedy13:41, 20 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84367Add isSpecial method. Likely to be used for bug 16288reedy01:15, 20 March 2011

Comments

#Comment by Bryan (talk | contribs)   18:45, 26 March 2011

hooks.txt fixed in r84381. I think the ampersand on $this is incorrect, but I'm not sure.

#Comment by Reedy (talk | contribs)   18:47, 26 March 2011

I've already killed it in a later commit, and updated the documentation also

Status & tagging log