X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fchanges%2FOldChangesList.php;h=8eb06ced032274f0ca806cee26a3e84076032f35;hp=6f05dc4b54528024fe6055554c019081df7b1eb5;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hpb=e4a26a1529f4b0e3f44ac6e2facc99843de207a5 diff --git a/includes/changes/OldChangesList.php b/includes/changes/OldChangesList.php index 6f05dc4b54..8eb06ced03 100644 --- a/includes/changes/OldChangesList.php +++ b/includes/changes/OldChangesList.php @@ -33,7 +33,7 @@ class OldChangesList extends ChangesList { */ 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 ) { @@ -43,11 +43,6 @@ class OldChangesList extends ChangesList { } } - // 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 ) { @@ -55,7 +50,7 @@ class OldChangesList extends ChangesList { $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; } @@ -79,8 +74,8 @@ class OldChangesList extends ChangesList { 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; } @@ -92,15 +87,15 @@ class OldChangesList extends ChangesList { } // 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 );