40 if ( $linenumber & 1 ) {
41 $classes[] =
'mw-line-odd';
43 $classes[] =
'mw-line-even';
49 if ( $this->watchlist ) {
50 $classes[] = Sanitizer::escapeClass(
'watchlist-' .
51 $rc->mAttribs[
'rc_namespace'] .
'-' . $rc->mAttribs[
'rc_title'] );
56 if ( !$this->getHookRunner()->onOldChangesListRecentChangesLine(
57 $this, $html, $rc, $classes, $attribs )
61 $attribs = array_filter( $attribs,
62 [ Sanitizer::class,
'isReservedDataAttribute' ],
70 $attribs[
'class'] = implode(
' ', $classes );
72 return $dateheader . Html::rawElement(
'li', $attribs, $html ) .
"\n";
86 if ( $rc->mAttribs[
'rc_log_type'] ) {
88 $this->
insertLog( $html, $logtitle, $rc->mAttribs[
'rc_log_type'],
false );
90 'bot' => $rc->mAttribs[
'rc_bot'] ],
'' );
91 if ( $flags !==
'' ) {
92 $html .=
' ' . $flags;
95 } elseif ( $rc->mAttribs[
'rc_namespace'] ==
NS_SPECIAL ) {
96 list( $name, $htmlubpage ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
97 resolveAlias( $rc->mAttribs[
'rc_title'] );
98 if ( $name ==
'Log' ) {
104 # M, N, b and ! (minor, new, bot and unpatrolled)
107 'newpage' => $rc->mAttribs[
'rc_type'] ==
RC_NEW,
108 'minor' => $rc->mAttribs[
'rc_minor'],
109 'unpatrolled' => $unpatrolled,
110 'bot' => $rc->mAttribs[
'rc_bot']
118 # Bytes added or removed
119 if ( $this->
getConfig()->
get(
'RCShowChangedSize' ) ) {
122 $html .= $cd .
' <span class="mw-changeslist-separator"></span> ';
126 if ( $rc->mAttribs[
'rc_type'] ==
RC_LOG ) {
133 # LTR/RTL direction mark
145 # How many users watch this page
146 if ( $rc->numberofWatchingusers > 0 ) {
150 $html = Html::rawElement(
'span', [
151 'class' =>
'mw-changeslist-line-inner',
152 'data-target-page' => $rc->
getTitle(),
154 if ( is_callable( $this->changeLinePrefixer ) ) {
155 $prefix = call_user_func( $this->changeLinePrefixer, $rc, $this,
false );
156 $html = Html::rawElement(
'span', [
'class' =>
'mw-changeslist-line-prefix' ], $prefix ) . $html;
formatCharacterDifference(RecentChange $old, RecentChange $new=null)
Format the character difference of one or several changes.
insertDateHeader(&$s, $rc_timestamp)
insertRollback(&$s, &$rc)
Insert a rollback link.
showAsUnpatrolled(RecentChange $rc)
getHighlightsContainerDiv()
Get the container for highlights that are used in the new StructuredFilters system.
recentChangesFlags( $flags, $nothing="\u{00A0}")
Returns the appropriate flags for new page, minor change and patrolling.
getDataAttributes(RecentChange $rc)
Get recommended data attributes for a change line.
numberofWatchingusers( $count)
Returns the string which indicates the number of watching users.
getHTMLClasses( $rc, $watched)
Get an array of default HTML class attributes for the change.
getArticleLink(&$rc, $unpatrolled, $watched)
Get the HTML link to the changed page, possibly with a prefix from hook handlers, and a suffix for te...
insertUserRelatedLinks(&$s, &$rc)
Insert links to user page, user talk page and eventually a blocking link.
insertLogEntry( $rc)
Insert a formatted action.
insertLog(&$s, $title, $logtype, $useParentheses=true)
insertTags(&$s, &$rc, &$classes)
insertComment( $rc)
Insert a formatted comment.
insertExtra(&$s, &$rc, &$classes)
isCategorizationWithoutRevision( $rcObj)
Determines whether a revision is linked to this change; this may not be the case when the categorizat...
insertDiffHist(&$s, &$rc, $unpatrolled=null)
insertTimestamp(&$s, $rc)
Insert time timestamp string from $rc into $s.
formatChangeLine(RecentChange $rc, array &$classes, $watched)
recentChangesLine(&$rc, $watched=false, $linenumber=null)
Format a line using the old system (aka without any javascript).
Utility class for creating new RC entries.
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,...