Add array with watchlist options to SpecialWatchlistQuery
authorMarius Hoch <hoo@online.de>
Sat, 16 Mar 2013 20:53:37 +0000 (21:53 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 18 Mar 2013 09:49:14 +0000 (09:49 +0000)
This data is very useful with the hook as it holds the
criteria to build the watchlist query.

Change-Id: I688ab0b35b301f180bbfde3ad3043b1ee602de10

docs/hooks.txt
includes/specials/SpecialWatchlist.php

index 3670cbe..c266dcc 100644 (file)
@@ -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
index f52c9a7..c7f122b 100644 (file)
@@ -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();