$data['tags'] = $this->getTags( $rcObj, $classes );
// give the hook a chance to modify the data
- Hooks::run( 'EnhancedChangesListModifyLineData',
+ $success = Hooks::run( 'EnhancedChangesListModifyLineData',
array( $this, &$data, $block, $rcObj ) );
+ if ( !$success ) {
+ // skip entry if hook aborted it
+ continue;
+ }
$line = '<tr' . $trClass . '><td></td><td class="mw-enhanced-rc">';
if ( isset( $data['recentChangesFlags'] ) ) {
? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
# Flag and Timestamp
- $data['recentChangesFlags'] = $this->recentChangesFlags( array(
+ $data['recentChangesFlags'] = array(
'newpage' => $type == RC_NEW,
'minor' => $rcObj->mAttribs['rc_minor'],
'unpatrolled' => $rcObj->unpatrolled,
'bot' => $rcObj->mAttribs['rc_bot'],
- ) );
+ );
// timestamp is not really a link here, but is called timestampLink
// for consistency with EnhancedChangesListModifyLineData
$data['timestampLink'] = $rcObj->timestamp;
$data['watchingUsers'] = $this->numberofWatchingusers( $rcObj->numberofWatchingusers );
// give the hook a chance to modify the data
- Hooks::run( 'EnhancedChangesListModifyBlockLineData',
+ $success = Hooks::run( 'EnhancedChangesListModifyBlockLineData',
array( $this, &$data, $rcObj ) );
+ if ( !$success ) {
+ // skip entry if hook aborted it
+ return '';
+ }
$line = Html::openElement( 'table', array( 'class' => $classes ) ) .
Html::openElement( 'tr' );