From: Alexandre Emsenhuber Date: Sun, 19 Apr 2009 15:12:15 +0000 (+0000) Subject: Document APIQueryUsersTokens and WikiExporter::dumpStableQuery hooks X-Git-Tag: 1.31.0-rc.0~42109 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=8b5bb8e1bf561c898888f66fd7c8b00e40c4cd1f;p=lhc%2Fweb%2Fwiklou.git Document APIQueryUsersTokens and WikiExporter::dumpStableQuery hooks --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 9cfaa39eb9..11a62edb33 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -335,6 +335,15 @@ 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) +'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 token, or false if the user isn't allowed to obtain +it. The prototype of the callback function is func($user) where $user +is the User object. In the hook, just add your callback to the +$tokenFunctions array and return true (returning false makes no sense) +$tokenFunctions: array(action => callback) + 'ArticleAfterFetchContent': after fetching content of an article from the database $article: the article (object) being loaded from the database $content: the content (string) of the article @@ -1479,6 +1488,12 @@ $article: article object to be watched $user: user that watched $article: article object watched +'WikiExporter::dumpStableQuery': Get the SELECT query for "stable" revisions dumps +One, and only one hook should set this, and return false. +&$tables: Database tables to use in the SELECT query +&$opts: Options to use for the query +&$join: Join conditions + 'wgQueryPages': called when initialising $wgQueryPages, use this to add new query pages to be updated with maintenance/updateSpecialPages.php $query: $wgQueryPages itself