Go to the documentation of this file.
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'] );
58 if ( !
Hooks::run(
'OldChangesListRecentChangesLine',
59 [ &$list, &$html, $rc, &$classes, &$attribs ] )
63 $attribs = array_filter( $attribs,
64 [ Sanitizer::class,
'isReservedDataAttribute' ],
72 $attribs[
'class'] = implode(
' ', $classes );
74 return $dateheader . Html::rawElement(
'li', $attribs, $html ) .
"\n";
88 if ( $rc->mAttribs[
'rc_log_type'] ) {
90 $this->
insertLog( $html, $logtitle, $rc->mAttribs[
'rc_log_type'],
false );
92 'bot' => $rc->mAttribs[
'rc_bot'] ],
'' );
93 if ( $flags !==
'' ) {
94 $html .=
' ' . $flags;
97 } elseif ( $rc->mAttribs[
'rc_namespace'] ==
NS_SPECIAL ) {
98 list( $name, $htmlubpage ) = MediaWikiServices::getInstance()->getSpecialPageFactory()->
99 resolveAlias( $rc->mAttribs[
'rc_title'] );
100 if ( $name ==
'Log' ) {
106 # M, N, b and ! (minor, new, bot and unpatrolled)
109 'newpage' => $rc->mAttribs[
'rc_type'] ==
RC_NEW,
110 'minor' => $rc->mAttribs[
'rc_minor'],
111 'unpatrolled' => $unpatrolled,
112 'bot' => $rc->mAttribs[
'rc_bot']
120 # Bytes added or removed
121 if ( $this->
getConfig()->
get(
'RCShowChangedSize' ) ) {
124 $html .= $cd .
' <span class="mw-changeslist-separator"></span> ';
128 if ( $rc->mAttribs[
'rc_type'] ==
RC_LOG ) {
135 # LTR/RTL direction mark
147 # How many users watch this page
148 if ( $rc->numberofWatchingusers > 0 ) {
152 $html = Html::rawElement(
'span', [
153 'class' =>
'mw-changeslist-line-inner',
154 'data-target-page' => $rc->
getTitle(),
156 if ( is_callable( $this->changeLinePrefixer ) ) {
157 $prefix = call_user_func( $this->changeLinePrefixer, $rc, $this,
false );
158 $html = Html::rawElement(
'span', [
'class' =>
'mw-changeslist-line-prefix' ], $prefix ) . $html;
insertComment( $rc)
Insert a formatted comment.
Utility class for creating new RC entries.
getHighlightsContainerDiv()
Get the container for highlights that are used in the new StructuredFilters system.
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,...
recentChangesLine(&$rc, $watched=false, $linenumber=null)
Format a line using the old system (aka without any javascript).
formatCharacterDifference(RecentChange $old, RecentChange $new=null)
Format the character difference of one or several changes.
insertLog(&$s, $title, $logtype, $useParentheses=true)
insertDateHeader(&$s, $rc_timestamp)
insertLogEntry( $rc)
Insert a formatted action.
insertTags(&$s, &$rc, &$classes)
insertUserRelatedLinks(&$s, &$rc)
Insert links to user page, user talk page and eventually a blocking link.
getArticleLink(&$rc, $unpatrolled, $watched)
getDataAttributes(RecentChange $rc)
Get recommended data attributes for a change line.
insertTimestamp(&$s, $rc)
Insert time timestamp string from $rc into $s.
numberofWatchingusers( $count)
Returns the string which indicates the number of watching users.
showAsUnpatrolled(RecentChange $rc)
getHTMLClasses( $rc, $watched)
Get an array of default HTML class attributes for the change.
recentChangesFlags( $flags, $nothing="\u{00A0}")
Returns the appropriate flags for new page, minor change and patrolling.
insertDiffHist(&$s, &$rc, $unpatrolled=null)
formatChangeLine(RecentChange $rc, array &$classes, $watched)
isCategorizationWithoutRevision( $rcObj)
Determines whether a revision is linked to this change; this may not be the case when the categorizat...
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
insertExtra(&$s, &$rc, &$classes)
insertRollback(&$s, &$rc)
Insert a rollback link.