Manual:Hooks/BeforeWatchlist

From MediaWiki.org
Jump to: navigation, search
BeforeWatchlist
Available from version 1.12.0
Removed in version 1.14.0
Override watchlist display or add extra SQL clauses.

*Define function:
function fnMyHook( $nondefaults, $user, &$hookSql ) { ... }

*Attach hook:
$wgHooks['BeforeWatchlist'][] = 'MyExtensionHooks::someExample';
Called from: SpecialWatchlist.php

*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:BeforeWatchlist extensions.


Warning Warning: This hook has been completely removed in 1.14.0 and replaced by SpecialWatchlistQuery.

[edit] Details

array $nondefaults: Assoc array with the following keys: days, hideOwn, hideBots, hideMinor, namespace

User $user: wgUser.

string &$hookSql: a string which will be inserted without sanitation into the SQL query used to get the watchlist, at the end of the WHERE part.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox