}
/**
- * Return an array of subpages beginning with $search that this special page will accept.
+ * Return an array of subpages that this special page will accept.
*
- * @param string $search Prefix to search for
- * @param int $limit Maximum number of results to return
- * @return string[] Matching subpages
+ * @see also SpecialWatchlist::getSubpagesForPrefixSearch
+ * @return string[] subpages
*/
- public function prefixSearchSubpages( $search, $limit = 10 ) {
- return self::prefixSearchArray(
- $search,
- $limit,
- // SpecialWatchlist uses SpecialEditWatchlist::getMode, so new types should be added
- // here and there - no 'edit' here, because that the default for this page
- array(
- 'clear',
- 'raw',
- )
+ public function getSubpagesForPrefixSearch() {
+ // SpecialWatchlist uses SpecialEditWatchlist::getMode, so new types should be added
+ // here and there - no 'edit' here, because that the default for this page
+ return array(
+ 'clear',
+ 'raw',
);
}
// Do a batch existence check
$batch = new LinkBatch();
if ( count( $titles ) >= 100 ) {
- $output = wfMessage( 'watchlistedit-too-many' )->parse();
+ $output = $this->msg( 'watchlistedit-too-many' )->parse();
return;
}
foreach ( $titles as $title ) {
);
$page = WikiPage::factory( $title );
- wfRunHooks( 'UnwatchArticleComplete', array( $this->getUser(), &$page ) );
+ Hooks::run( 'UnwatchArticleComplete', array( $this->getUser(), &$page ) );
}
}
}
// Allow subscribers to manipulate the list of watched pages (or use it
// to preload lots of details at once)
$watchlistInfo = $this->getWatchlistInfo();
- wfRunHooks(
+ Hooks::run(
'WatchlistEditorBeforeFormRender',
array( &$watchlistInfo )
);
);
}
- wfRunHooks(
+ Hooks::run(
'WatchlistEditorBuildRemoveLine',
array( &$tools, $title, $title->isRedirect(), $this->getSkin(), &$link )
);
return Html::rawElement(
'span',
array( 'class' => 'mw-watchlist-toollinks' ),
- wfMessage( 'parentheses', $wgLang->pipeList( $tools ) )->text()
+ wfMessage( 'parentheses' )->rawParams( $wgLang->pipeList( $tools ) )->escaped()
);
}
}