r49644 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49643‎ | r49644 | r49645 >
Date:15:12, 19 April 2009
Author:ialex
Status:ok
Tags:
Comment:
Document APIQueryUsersTokens and WikiExporter::dumpStableQuery hooks
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -335,6 +335,15 @@
336336 $tokenFunctions array and return true (returning false makes no sense)
337337 $tokenFunctions: array(action => callback)
338338
 339+'APIQueryUsersTokens': use this hook to add custom token to list=users.
 340+Every token has an action, which will be used in the ustoken parameter
 341+and in the output (actiontoken="..."), and a callback function which
 342+should return the token, or false if the user isn't allowed to obtain
 343+it. The prototype of the callback function is func($user) where $user
 344+is the User object. In the hook, just add your callback to the
 345+$tokenFunctions array and return true (returning false makes no sense)
 346+$tokenFunctions: array(action => callback)
 347+
339348 'ArticleAfterFetchContent': after fetching content of an article from the database
340349 $article: the article (object) being loaded from the database
341350 $content: the content (string) of the article
@@ -1479,6 +1488,12 @@
14801489 $user: user that watched
14811490 $article: article object watched
14821491
 1492+'WikiExporter::dumpStableQuery': Get the SELECT query for "stable" revisions dumps
 1493+One, and only one hook should set this, and return false.
 1494+&$tables: Database tables to use in the SELECT query
 1495+&$opts: Options to use for the query
 1496+&$join: Join conditions
 1497+
14831498 'wgQueryPages': called when initialising $wgQueryPages, use this to add new query pages to be updated with maintenance/updateSpecialPages.php
14841499 $query: $wgQueryPages itself
14851500

Status & tagging log