''
);
- if ( !wfRunHooks( 'ChangesListSpecialPageQuery',
- array( $this->getName(), &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) )
+ if ( !$this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds,
+ $opts )
) {
return false;
}
);
}
+ protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) {
+ return wfRunHooks(
+ 'ChangesListSpecialPageQuery',
+ array( $this->getName(), &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts )
+ );
+ }
+
/**
* Return a DatabaseBase object for reading
*
$opts['tagfilter']
);
- if ( !wfRunHooks( 'SpecialRecentChangesQuery',
- array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ),
- '1.23' )
+ if ( !$this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds,
+ $opts )
) {
return false;
}
return $rows;
}
+ protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) {
+ return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
+ && wfRunHooks(
+ 'SpecialRecentChangesQuery',
+ array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ),
+ '1.23'
+ );
+ }
+
public function outputFeedLinks() {
$this->addFeedLinks( $this->getFeedQuery() );
}
$opts['tagfilter']
);
- if ( !wfRunHooks( 'SpecialRecentChangesQuery',
- array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ),
- '1.23' )
+ if ( !$this->runMainQueryHook( $conds, $tables, $join_conds, $opts, $query_options,
+ $select )
) {
return false;
}
return $res;
}
+ protected function runMainQueryHook( &$tables, &$select, &$conds, &$query_options, &$join_conds, $opts ) {
+ return parent::runMainQueryHook( $tables, $select, $conds, $query_options, $join_conds, $opts )
+ && wfRunHooks(
+ 'SpecialRecentChangesQuery',
+ array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ),
+ '1.23'
+ );
+ }
+
function setTopText( FormOptions $opts ) {
$target = $this->getTargetTitle();
if ( $target ) {
''
);
- wfRunHooks( 'SpecialWatchlistQuery',
- array( &$conds, &$tables, &$join_conds, &$fields, $opts ),
- '1.23' );
+ $this->runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts );
return $dbr->select(
$tables,
);
}
+ protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts ) {
+ return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
+ && wfRunHooks(
+ 'SpecialWatchlistQuery',
+ array( &$conds, &$tables, &$join_conds, &$fields, $opts ),
+ '1.23'
+ );
+ }
+
/**
* Return a DatabaseBase object for reading
*