*/
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
- $classes = array();
+ $classes = $this->getHTMLClasses( $rc, $watched );
// use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
if ( $linenumber ) {
if ( $linenumber & 1 ) {
}
}
- // Indicate watched status on the line to allow for more
- // comprehensive styling.
- $classes[] = $watched && $rc->mAttribs['rc_timestamp'] >= $watched
- ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
-
$html = $this->formatChangeLine( $rc, $classes, $watched );
if ( $this->watchlist ) {
$rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
}
- if ( !Hooks::run( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
+ if ( !Hooks::run( 'OldChangesListRecentChangesLine', [ &$this, &$html, $rc, &$classes ] ) ) {
return false;
}
if ( $rc->mAttribs['rc_log_type'] ) {
$logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] );
$this->insertLog( $html, $logtitle, $rc->mAttribs['rc_log_type'] );
- $flags = $this->recentChangesFlags( array( 'unpatrolled' =>$unpatrolled,
- 'bot' => $rc->mAttribs['rc_bot'] ), '' );
+ $flags = $this->recentChangesFlags( [ 'unpatrolled' =>$unpatrolled,
+ 'bot' => $rc->mAttribs['rc_bot'] ], '' );
if ( $flags !== '' ) {
$html .= ' ' . $flags;
}
}
// Regular entries
} else {
- $this->insertDiffHist( $html, $rc, $unpatrolled );
+ $this->insertDiffHist( $html, $rc );
# M, N, b and ! (minor, new, bot and unpatrolled)
$html .= $this->recentChangesFlags(
- array(
+ [
'newpage' => $rc->mAttribs['rc_type'] == RC_NEW,
'minor' => $rc->mAttribs['rc_minor'],
'unpatrolled' => $unpatrolled,
'bot' => $rc->mAttribs['rc_bot']
- ),
+ ],
''
);
$html .= $this->getArticleLink( $rc, $unpatrolled, $watched );