From 8b5bb8e1bf561c898888f66fd7c8b00e40c4cd1f Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 19 Apr 2009 15:12:15 +0000 Subject: [PATCH] Document APIQueryUsersTokens and WikiExporter::dumpStableQuery hooks --- docs/hooks.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 2.20.1