instead.
=== New features in 1.24 ===
+* Added new hook WatchlistEditorBeforeFormRender, allowing subscribers to
+ manipulate the list of pages and/or preload lots of data at once.
* Added new argument &$link in hook WatchlistEditorBuildRemoveLine, allowing the
link to the title to be changed.
* Added a new hook, "WhatLinksHereProps", to allow extensions to annotate
$user: user that watched
$page: WikiPage object watched
+'WatchlistEditorBeforeFormRender': Before building the Special:EditWatchlist
+form, used to manipulate the list of pages or preload data based on that list.
+&$watchlistInfo: array of watchlisted pages in
+ [namespaceId => ['title1' => 1, 'title2' => 1]] format
+
'WatchlistEditorBuildRemoveLine': when building remove lines in
Special:Watchlist/edit.
&$tools: array of extra links
$fields = array();
$count = 0;
- foreach ( $this->getWatchlistInfo() as $namespace => $pages ) {
+ // Allow subscribers to manipulate the list of watched pages (or use it
+ // to preload lots of details at once)
+ $watchlistInfo = $this->getWatchlistInfo();
+ wfRunHooks(
+ 'WatchlistEditorBeforeFormRender',
+ array( &$watchlistInfo )
+ );
+
+ foreach ( $watchlistInfo as $namespace => $pages ) {
$options = array();
foreach ( array_keys( $pages ) as $dbkey ) {