}
/**
- * 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 SpecialEditWatchlist::getSubpagesForPrefixSearch
+ * @return string[] subpages
*/
- public function prefixSearchSubpages( $search, $limit = 10 ) {
- // See also SpecialEditWatchlist::prefixSearchSubpages
- return self::prefixSearchArray(
- $search,
- $limit,
- array(
- 'clear',
- 'edit',
- 'raw',
- )
+ public function getSubpagesForPrefixSearch() {
+ return array(
+ 'clear',
+ 'edit',
+ 'raw',
);
}
protected function getCustomFilters() {
if ( $this->customFilters === null ) {
$this->customFilters = parent::getCustomFilters();
- wfRunHooks( 'SpecialWatchlistFilters', array( $this, &$this->customFilters ), '1.23' );
+ Hooks::run( 'SpecialWatchlistFilters', array( $this, &$this->customFilters ), '1.23' );
}
return $this->customFilters;
} else {
# Top log Ids for a page are not stored
$nonRevisionTypes = array( RC_LOG );
- wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
+ Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
if ( $nonRevisionTypes ) {
$conds[] = $dbr->makeList(
array(
&$join_conds, $opts
) {
return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
- && wfRunHooks(
+ && Hooks::run(
'SpecialWatchlistQuery',
array( &$conds, &$tables, &$join_conds, &$fields, $opts ),
'1.23'
}
/**
- * Return a DatabaseBase object for reading
+ * Return a IDatabase object for reading
*
- * @return DatabaseBase
+ * @return IDatabase
*/
protected function getDB() {
return wfGetDB( DB_SLAVE, 'watchlist' );
$filters[$key] = $params['msg'];
}
// Disable some if needed
- if ( !$user->useNPPatrol() ) {
+ if ( !$user->useRCPatrol() ) {
unset( $filters['hidepatrolled'] );
}
/**
* Count the number of items on a user's watchlist
*
- * @param DatabaseBase $dbr A database connection
+ * @param IDatabase $dbr A database connection
* @return int
*/
protected function countItems( $dbr ) {