37 if ( $linenumber & 1 ) {
38 $classes[] =
'mw-line-odd';
40 $classes[] =
'mw-line-even';
44 $html = $this->formatChangeLine( $rc, $classes, $watched );
46 if ( $this->watchlist ) {
47 $classes[] = Sanitizer::escapeClass(
'watchlist-' .
48 $rc->mAttribs[
'rc_namespace'] .
'-' . $rc->mAttribs[
'rc_title'] );
53 if ( !$this->getHookRunner()->onOldChangesListRecentChangesLine(
54 $this, $html, $rc, $classes, $attribs )
58 $attribs = array_filter( $attribs,
59 Sanitizer::isReservedDataAttribute( ... ),
67 $attribs[
'class'] = $classes;
69 return $dateheader . Html::rawElement(
'li', $attribs, $html ) .
"\n";
79 private function formatChangeLine(
RecentChange $rc, array &$classes, $watched ) {
83 if ( $rc->mAttribs[
'rc_log_type'] ) {
85 $this->
insertLog( $html, $logtitle, $rc->mAttribs[
'rc_log_type'],
false );
87 'bot' => $rc->mAttribs[
'rc_bot'] ],
'' );
88 if ( $flags !==
'' ) {
89 $html .=
' ' . $flags;
92 } elseif ( $rc->mAttribs[
'rc_namespace'] ==
NS_SPECIAL ) {
94 resolveAlias( $rc->mAttribs[
'rc_title'] );
95 if ( $name ==
'Log' ) {
101 # M, N, b and ! (minor, new, bot and unpatrolled)
105 'minor' => $rc->mAttribs[
'rc_minor'],
106 'unpatrolled' => $unpatrolled,
107 'bot' => $rc->mAttribs[
'rc_bot']
115 # Bytes added or removed
119 $html .= $cd .
' <span class="mw-changeslist-separator"></span> ';
142 # How many users watch this page
143 if ( $rc->numberofWatchingusers > 0 ) {
149 $titleText = $this->
msg(
'rev-deleted-event' )->escaped();
153 $html = Html::rawElement(
'span', [
154 'class' =>
'mw-changeslist-line-inner',
155 'data-target-page' => $titleText,
157 if ( is_callable( $this->changeLinePrefixer ) ) {
159 $html = Html::rawElement(
'span', [
'class' =>
'mw-changeslist-line-prefix' ], $prefix ) . $html;
167class_alias( OldChangesList::class,
'OldChangesList' );
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
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,...