50 if ( $linenumber & 1 ) {
51 $classes[] =
'mw-line-odd';
53 $classes[] =
'mw-line-even';
57 $html = $this->formatChangeLine( $rc, $classes, $watched );
59 if ( $this->watchlist ) {
60 $classes[] = Sanitizer::escapeClass(
'watchlist-' .
61 $rc->mAttribs[
'rc_namespace'] .
'-' . $rc->mAttribs[
'rc_title'] );
66 if ( !$this->getHookRunner()->onOldChangesListRecentChangesLine(
67 $this, $html, $rc, $classes, $attribs )
71 $attribs = array_filter( $attribs,
72 [ Sanitizer::class,
'isReservedDataAttribute' ],
80 $attribs[
'class'] = $classes;
82 return $dateheader . Html::rawElement(
'li', $attribs, $html ) .
"\n";
92 private function formatChangeLine(
RecentChange $rc, array &$classes, $watched ) {
96 if ( $rc->mAttribs[
'rc_log_type'] ) {
98 $this->
insertLog( $html, $logtitle, $rc->mAttribs[
'rc_log_type'],
false );
100 'bot' => $rc->mAttribs[
'rc_bot'] ],
'' );
101 if ( $flags !==
'' ) {
102 $html .=
' ' . $flags;
105 } elseif ( $rc->mAttribs[
'rc_namespace'] ==
NS_SPECIAL ) {
107 resolveAlias( $rc->mAttribs[
'rc_title'] );
108 if ( $name ==
'Log' ) {
114 # M, N, b and ! (minor, new, bot and unpatrolled)
117 'newpage' => $rc->mAttribs[
'rc_type'] ==
RC_NEW,
118 'minor' => $rc->mAttribs[
'rc_minor'],
119 'unpatrolled' => $unpatrolled,
120 'bot' => $rc->mAttribs[
'rc_bot']
128 # Bytes added or removed
132 $html .= $cd .
' <span class="mw-changeslist-separator"></span> ';
136 if ( $rc->mAttribs[
'rc_type'] ==
RC_LOG ) {
153 # How many users watch this page
154 if ( $rc->numberofWatchingusers > 0 ) {
158 $html = Html::rawElement(
'span', [
159 'class' =>
'mw-changeslist-line-inner',
160 'data-target-page' => $rc->
getTitle(),
162 if ( is_callable( $this->changeLinePrefixer ) ) {
164 $html = Html::rawElement(
'span', [
'class' =>
'mw-changeslist-line-prefix' ], $prefix ) . $html;
172class_alias( OldChangesList::class,
'OldChangesList' );
A class containing constants representing the names of configuration variables.
const RCShowChangedSize
Name constant for the RCShowChangedSize setting, for use with Config::get()
Parent class for all special pages.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...