$tableClasses[] = Sanitizer::escapeClass( 'mw-changeslist-ns'
. $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
}
- if ( $block[0]->watched
- && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
- ) {
+ if ( $block[0]->watched ) {
$tableClasses[] = 'mw-changeslist-line-watched';
} else {
$tableClasses[] = 'mw-changeslist-line-not-watched';
foreach ( $block as $rcObj ) {
// If all log actions to this page were hidden, then don't
// give the name of the affected page for this block!
- if ( !$this->isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
+ if ( !static::isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
$namehidden = false;
}
$u = $rcObj->userlink;
} elseif ( $allLogs ) {
$articleLink = $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
} else {
- $articleLink = $this->getArticleLink( $block[0], $block[0]->unpatrolled, $block[0]->watched );
+ $articleLink = $this->getArticleLink(
+ $block[0], $block[0]->unpatrolled, $block[0]->watched );
}
$queryParams['curid'] = $curId;
$lineParams = [ 'targetTitle' => $rcObj->getTitle() ];
$classes = [ 'mw-enhanced-rc' ];
- if ( $rcObj->watched
- && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
- ) {
+ if ( $rcObj->watched ) {
$classes[] = 'mw-enhanced-watched';
}
$classes = array_merge( $classes, $this->getHTMLClasses( $rcObj, $rcObj->watched ) );
[],
$params
);
- if ( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
+ if ( static::isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
$link = '<span class="history-deleted">' . $link . '</span> ';
}
}
/**
* Generates amount of changes (linking to diff ) & link to history.
*
- * @param array $block
+ * @param RCCacheEntry[] $block
* @param array $queryParams
* @param bool $allLogs
* @param bool $isnew
/** @var RCCacheEntry $rcObj */
foreach ( $block as $rcObj ) {
// Same logic as below inside main foreach
- if ( $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched ) {
+ if ( $rcObj->watched ) {
$sinceLast++;
$unvisitedOldid = $rcObj->mAttribs['rc_last_oldid'];
}
$block0 = $block[0];
$last = $block[count( $block ) - 1];
if ( !$allLogs ) {
- if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ||
+ if (
$isnew ||
- $rcObj->mAttribs['rc_type'] == RC_CATEGORIZE
+ $rcObj->mAttribs['rc_type'] == RC_CATEGORIZE ||
+ !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() )
) {
$links['total-changes'] = Html::rawElement( 'span', [], $nchanges[$n] );
} else {
]
)
);
- if ( $sinceLast > 0 && $sinceLast < $n ) {
- $links['total-changes-since-last'] = Html::rawElement( 'span', [],
- $this->linkRenderer->makeKnownLink(
- $block0->getTitle(),
- new HtmlArmor( $sinceLastVisitMsg[$sinceLast] ),
- [ 'class' => 'mw-changeslist-groupdiff' ],
- $queryParams + [
- 'diff' => $currentRevision,
- 'oldid' => $unvisitedOldid,
- ]
- )
- );
- }
+ }
+
+ if (
+ $rcObj->mAttribs['rc_type'] != RC_CATEGORIZE &&
+ $sinceLast > 0 &&
+ $sinceLast < $n
+ ) {
+ $links['total-changes-since-last'] = Html::rawElement( 'span', [],
+ $this->linkRenderer->makeKnownLink(
+ $block0->getTitle(),
+ new HtmlArmor( $sinceLastVisitMsg[$sinceLast] ),
+ [ 'class' => 'mw-changeslist-groupdiff' ],
+ $queryParams + [
+ 'diff' => $currentRevision,
+ 'oldid' => $unvisitedOldid,
+ ]
+ )
+ );
}
}