From 4baa84fd5dd299b0a654cdaa08316693f429f4ac Mon Sep 17 00:00:00 2001 From: Marius Hoch Date: Sat, 16 Mar 2013 21:53:37 +0100 Subject: [PATCH] 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 --- docs/hooks.txt | 1 + includes/specials/SpecialWatchlist.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.20.1