row, Revision::DELETED_RESTRICTED, $this->list->getUser() );
}
public function canViewContent() {
return true; // none
}
/**
* @return string Comma-separated list of tags
*/
public function getTags() {
return $this->row->ts_tags;
}
/**
* @return string A HTML
element representing this revision, showing
* change tags and everything
*/
public function getHTML() {
$date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
$this->row->log_timestamp, $this->list->getUser() ) );
$title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
$formatter = LogFormatter::newFromRow( $this->row );
$formatter->setContext( $this->list->getContext() );
$formatter->setAudience( LogFormatter::FOR_THIS_USER );
// Log link for this page
$loglink = Linker::link(
SpecialPage::getTitleFor( 'Log' ),
$this->list->msg( 'log' )->escaped(),
array(),
array( 'page' => $title->getPrefixedText() )
);
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
// Comment
$comment = $this->list->getLanguage()->getDirMark() .
$formatter->getComment();
if ( LogEventsList::isDeleted( $this->row, LogPage::DELETED_COMMENT ) ) {
$comment = '' . $comment . '';
}
$content = "$loglink $date $action $comment";
$attribs = array();
$tags = $this->getTags();
if ( $tags ) {
list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow( $tags, 'edittags' );
$content .= " $tagSummary";
$attribs['class'] = implode( ' ', $classes );
}
return Xml::tags( 'li', $attribs, $content );
}
}