if( !isset( $this->message ) ) {
foreach( explode(' ', 'cur diff hist minoreditletter newpageletter last '.
'blocklink history boteditletter semicolon-separator' ) as $msg ) {
- $this->message[$msg] = wfMsgExt( $msg, array( 'escape') );
+ $this->message[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
}
}
}
# Make date header if necessary
$date = $wgLang->date( $rc_timestamp, true, true );
- $s = '';
if( $date != $this->lastdate ) {
if( '' != $this->lastdate ) {
$s .= "</ul>\n";
protected function insertTimestamp(&$s, $rc) {
global $wgLang;
# Timestamp
- $s .= $this->message['semicolon-separator'] . ' ' . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
+ $s .= $this->message['semicolon-separator'] . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
}
/** Insert links to user page, user talk page and eventually a blocking link */
- protected function insertUserRelatedLinks(&$s, &$rc) {
+ public function insertUserRelatedLinks(&$s, &$rc) {
if ( $this->isDeleted($rc,Revision::DELETED_USER) ) {
$s .= ' <span class="history-deleted">' . wfMsgHtml('rev-deleted-user') . '</span>';
} else {
if( ( $rc->mAttribs['rc_deleted'] & $field ) == $field ) {
global $wgUser;
$permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) == Revision::DELETED_RESTRICTED
- ? 'hiderevision'
+ ? 'suppressrevision'
: 'deleterevision';
wfDebug( "Checking for $permission due to $field match on $rc->mAttribs['rc_deleted']\n" );
return $wgUser->isAllowed( $permission );
# Should patrol-related stuff be shown?
$unpatrolled = $wgUser->useRCPatrol() && $rc_patrolled == 0;
- $this->insertDateHeader($s,$rc_timestamp);
+ $dateheader = ""; // $s now contains only <li>...</li>, for hooks' convenience.
+ $this->insertDateHeader($dateheader,$rc_timestamp);
- $s .= '<li>';
+ $s = '';
// Moved pages
if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
$s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers));
}
- $s .= "</li>\n";
+ wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) );
+
+ $s = "<li>$s</li>\n";
wfProfileOut( $fname.'-rest' );
wfProfileOut( $fname );
- return $s;
+ return $dateheader . $s;
}
}
$clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
// Log entries
} else if( $rc_type == RC_LOG ) {
- global $wgRCTypeGroupedLogs;
- if( $rc_log_type && in_array($rc_log_type,$wgRCTypeGroupedLogs) ) {
+ if( $rc_log_type ) {
$logtitle = SpecialPage::getTitleFor( 'Log', $rc_log_type );
$clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, LogPage::logName($rc_log_type) ) . ')';
} else {
# Use an @ character to prevent collision with page names
$this->rc_cache['@@' . ($this->rcMoveIndex++)] = array($rc);
} else {
- global $wgRCTypeGroupedLogs;
- # Some logs are best grouped by type (block,rights)
- if( $rc_type == RC_LOG && in_array($rc_log_type,$wgRCTypeGroupedLogs) ){
+ # Logs are grouped by type
+ if( $rc_type == RC_LOG ){
$secureName = SpecialPage::getTitleFor( 'Log', $rc_log_type )->getPrefixedDBkey();
}
if( !isset( $this->rc_cache[$secureName] ) ) {
$text = $userlink;
$text .= $wgContLang->getDirMark();
if( $count > 1 ) {
- $text .= ' ('.$count.'×)';
+ $text .= ' (' . $wgLang->formatNum( $count ) . '×)';
}
array_push( $users, $text );
}
- $users = ' <span class="changedby">[' . implode( $this->message['semicolon-separator'] . ' ', $users ) . ']</span>';
+ $users = ' <span class="changedby">[' . implode( $this->message['semicolon-separator'], $users ) . ']</span>';
# Arrow
$rci = 'RCI'.$this->rcCacheIndex;
}
# History
- if( $namehidden || !$block[0]->getTitle()->exists() ) {
+ if( $alllogs ) {
+ // don't show history link for logs
+ } else if( $namehidden || !$block[0]->getTitle()->exists() ) {
$r .= '(' . $this->message['history'] . ')';
} else {
$r .= '(' . $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
if( $rc_this_oldid != 0 ) {
$o = 'oldid='.$rc_this_oldid;
}
- # Revision link
+ # Log timestamp
if( $rc_type == RC_LOG ) {
$link = '<tt>'.$rcObj->timestamp.'</tt> ';
+ # Revision link
} else if( !ChangesList::userCan($rcObj,Revision::DELETED_TEXT) ) {
$link = '<span class="history-deleted"><tt>'.$rcObj->timestamp.'</tt></span> ';
} else {
- $link = '<tt>'.$this->skin->makeKnownLinkObj( $rcObj->getTitle(), $rcObj->timestamp, $curIdEq.'&'.$o ).'</tt>';
+ $rcIdEq = ($rcObj->unpatrolled && $rc_type == RC_NEW) ? '&rcid='.$rcObj->mAttribs['rc_id'] : '';
+
+ $link = '<tt>'.$this->skin->makeKnownLinkObj( $rcObj->getTitle(), $rcObj->timestamp, $curIdEq.'&'.$o.$rcIdEq ).'</tt>';
if( $this->isDeleted($rcObj,Revision::DELETED_TEXT) )
$link = '<span class="history-deleted">'.$link.'</span> ';
}
if ( !$rc_type == RC_LOG || $rc_type == RC_NEW ) {
$r .= ' (';
$r .= $rcObj->curlink;
- $r .= $this->message['semicolon-separator'] . ' ';
+ $r .= $this->message['semicolon-separator'];
$r .= $rcObj->lastlink;
$r .= ')';
}
# Diff and hist links
if ( $rc_type != RC_LOG ) {
- $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator'] . ' ';
+ $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator'];
$r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' ) . ')';
}
$r .= ' . . ';
if( $this->isDeleted($rcObj,LogPage::DELETED_ACTION) ) {
$r .= ' <span class="history-deleted">' . wfMsgHtml('rev-deleted-event') . '</span>';
} else {
- $r .= ' ' . LogPage::actionText( $rc_log_type, $rc_log_action, $rcObj->getTitle(), $this->skin, LogPage::extractParams($rc_params), true, true );
+ $r .= ' ' . LogPage::actionText( $rc_log_type, $rc_log_action, $rcObj->getTitle(),
+ $this->skin, LogPage::extractParams($rc_params), true, true );
}
}