From: Marius Hoch Date: Sat, 16 Mar 2013 20:53:37 +0000 (+0100) Subject: Add array with watchlist options to SpecialWatchlistQuery X-Git-Tag: 1.31.0-rc.0~20301 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=4baa84fd5dd299b0a654cdaa08316693f429f4ac;p=lhc%2Fweb%2Fwiklou.git Add array with watchlist options to SpecialWatchlistQuery This data is very useful with the hook as it holds the criteria to build the watchlist query. Change-Id: I688ab0b35b301f180bbfde3ad3043b1ee602de10 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 3670cbe5a1..c266dcc583 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2272,6 +2272,7 @@ $special: the special page object &$tables: array of tables to be queried &$join_conds: join conditions for the tables &$fields: array of query fields +$values: array of variables with watchlist options 'TestCanonicalRedirect': Called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL. Gives a chance for diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index f52c9a7103..c7f122b899 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -293,7 +293,7 @@ class SpecialWatchlist extends SpecialPage { } ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $options, '' ); - wfRunHooks( 'SpecialWatchlistQuery', array( &$conds, &$tables, &$join_conds, &$fields ) ); + wfRunHooks( 'SpecialWatchlistQuery', array( &$conds, &$tables, &$join_conds, &$fields, $values ) ); $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $join_conds ); $numRows = $res->numRows();