57 $user = $this->context->getUser();
58 $counter = $baseRC->counter;
65 $cacheEntry->watched = $cacheEntry->mAttribs[
'rc_type'] ==
RC_LOG ?
false : $watched;
66 $cacheEntry->numberofWatchingusers = $baseRC->numberofWatchingusers;
68 $cacheEntry->link = $this->
buildCLink( $cacheEntry );
75 $cacheEntry->difflink = $this->
buildDiffLink( $cacheEntry, $showDiffLinks, $counter );
76 $cacheEntry->curlink = $this->
buildCurLink( $cacheEntry, $showDiffLinks, $counter );
77 $cacheEntry->lastlink = $this->
buildLastLink( $cacheEntry, $showDiffLinks );
80 $cacheEntry->userlink = $this->
getUserLink( $cacheEntry );
84 $cacheEntry->mAttribs[
'rc_user'],
85 $cacheEntry->mAttribs[
'rc_user_text'],
116 $type = $cacheEntry->mAttribs[
'rc_type'];
119 if ( $cacheEntry->unpatrolled &&
$type ==
RC_NEW ) {
120 $clink = $this->linkRenderer->makeKnownLink( $cacheEntry->getTitle() );
123 $logType = $cacheEntry->mAttribs[
'rc_log_type'];
128 wfDebugLog(
'recentchanges',
'Unexpected log entry with no log type in recent changes' );
129 $clink = $this->linkRenderer->makeLink( $cacheEntry->getTitle() );
133 wfDebugLog(
'recentchanges',
'Unexpected special page in recentchanges' );
137 $clink = $this->linkRenderer->makeKnownLink( $cacheEntry->getTitle() );
144 $logtitle = SpecialPage::getTitleFor(
'Log', $logType );
145 $logpage =
new LogPage( $logType );
146 $logname = $logpage->getName()->text();
148 $logLink = $this->context->msg(
'parentheses' )
150 $this->linkRenderer->makeKnownLink( $logtitle, $logname )
162 return $this->context->getLanguage()->userTime(
163 $cacheEntry->mAttribs[
'rc_timestamp'],
164 $this->context->getUser()
175 'curid' => $recentChange->mAttribs[
'rc_cur_id'],
177 'oldid' => $recentChange->mAttribs[
'rc_this_oldid']
193 if ( !$showDiffLinks ||
in_array( $cacheEntry->mAttribs[
'rc_type'], $logTypes ) ) {
196 $curUrl =
htmlspecialchars( $cacheEntry->getTitle()->getLinkURL( $queryParams ) );
197 $curLink =
"<a class=\"mw-changeslist-diff-cur\" href=\"$curUrl\">$curMessage</a>";
210 'curid' => $recentChange->mAttribs[
'rc_cur_id'],
211 'diff' => $recentChange->mAttribs[
'rc_this_oldid'],
212 'oldid' => $recentChange->mAttribs[
'rc_last_oldid']
228 if ( !$showDiffLinks ) {
230 }
elseif (
in_array( $cacheEntry->mAttribs[
'rc_type'], $logTypes ) ) {
233 $rcCurId = $cacheEntry->getAttribute(
'rc_cur_id' );
234 $pageTitle = Title::newFromID( $rcCurId );
235 if ( $pageTitle ===
null ) {
236 wfDebugLog(
'RCCacheEntryFactory',
'Could not get Title for rc_cur_id: ' . $rcCurId );
240 $diffLink =
"<a class=\"mw-changeslist-diff\" href=\"$diffUrl\">$diffMessage</a>";
242 $diffUrl =
htmlspecialchars( $cacheEntry->getTitle()->getLinkURL( $queryParams ) );
243 $diffLink =
"<a class=\"mw-changeslist-diff\" href=\"$diffUrl\">$diffMessage</a>";
258 $lastOldid = $cacheEntry->mAttribs[
'rc_last_oldid'];
260 $type = $cacheEntry->mAttribs[
'rc_type'];
264 if ( !$showDiffLinks || !$lastOldid ||
in_array(
$type, $logTypes ) ) {
267 $lastLink = $this->linkRenderer->makeKnownLink(
268 $cacheEntry->getTitle(),
270 [
'class' =>
'mw-changeslist-diff' ],
285 $userLink =
' <span class="history-deleted">' .
286 $this->context->msg(
'rev-deleted-user' )->escaped() .
'</span>';
289 $cacheEntry->mAttribs[
'rc_user'],
290 $cacheEntry->mAttribs[
'rc_user_text'],
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
static userCan( $rc, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this revision,...
static isUnpatrolled( $rc, User $user)
static isDeleted( $rc, $field)
Determine if said field of a revision is hidden.
static getLocal( $username)
Get local part of the user name.
Marks HTML that shouldn't be escaped.
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null, $useParentheses=true)
Generate standard user tool links (talk, contributions, block link, etc.)
Class to simplify the use of log pages.
LinkRenderer $linkRenderer
buildCurQueryParams(RecentChange $recentChange)
buildLastLink(RecentChange $cacheEntry, $showDiffLinks)
Builds the link to the previous version.
buildCLink(RecentChange $cacheEntry)
buildTimestamp(RecentChange $cacheEntry)
buildCurLink(RecentChange $cacheEntry, $showDiffLinks, $counter)
getUserLink(RecentChange $cacheEntry)
buildDiffQueryParams(RecentChange $recentChange)
showDiffLinks(RecentChange $cacheEntry, User $user)
newFromRecentChange(RecentChange $baseRC, $watched)
buildDiffLink(RecentChange $cacheEntry, $showDiffLinks, $counter)
__construct(IContextSource $context, $messages, LinkRenderer $linkRenderer)
static newFromParent( $rc)
Utility class for creating new RC entries.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
processing should stop and the error should be shown to the user * false
passed in as a query string parameter to the various URLs constructed here(i.e. $prevlink) $ldel you ll need to handle error messages
Interface for objects which can provide a MediaWiki context on request.