32 private $commentStore;
45 $this->commentStore = $commentStore;
53 return 'log_timestamp';
61 return 'log_user_text';
79 return (
int)$this->row->log_deleted;
85 $dbw->newUpdateQueryBuilder()
87 ->set( [
'log_deleted' => $bits ] )
89 'log_id' => $this->row->log_id,
90 'log_deleted' => $this->getBits()
92 ->caller( __METHOD__ )->execute();
94 if ( !$dbw->affectedRows() ) {
99 $dbw->newUpdateQueryBuilder()
100 ->update(
'recentchanges' )
102 'rc_deleted' => $bits,
106 'rc_logid' => $this->row->log_id,
107 'rc_timestamp' => $this->row->log_timestamp
109 ->caller( __METHOD__ )->execute();
115 $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
116 $this->row->log_timestamp, $this->list->getUser() ) );
117 $title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
119 $formatter->setContext( $this->list->getContext() );
124 SpecialPage::getTitleFor(
'Log' ),
125 $this->list->msg(
'log' )->text(),
127 [
'page' => $title->getPrefixedText() ]
129 $loglink = $this->list->msg(
'parentheses' )->rawParams( $loglink )->escaped();
131 $action = $formatter->getActionText();
133 $comment = $this->list->getLanguage()->getDirMark() .
134 $formatter->getComment();
136 $content =
"$loglink $date $action $comment";
138 if ( $this->row->ts_tags ) {
142 $this->list->getContext()
145 $attribs[
'class'] = implode(
' ', $classes );
152 $user = $this->list->getAuthority();
154 'id' => $logEntry->getId(),
155 'type' => $logEntry->getType(),
156 'action' => $logEntry->getSubtype(),
167 'userid' => $this->row->log_user ?? 0,
168 'user' => $this->row->log_user_text,
173 'comment' => $this->commentStore->getComment(
'log_comment', $this->row )->text,
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
This class represents the result of the API operations.
static newFromRow( $row)
Constructs new LogEntry from database result row.
static userCan( $row, $field, Authority $performer)
Determine if the current user is allowed to view a particular field of this log row,...
Parent class for all special pages.
Abstract base class for deletable items.
Item class for a logging table row.
getAuthorActorField()
Get the DB field name storing actor ids.
__construct(RevisionListBase $list, $row, CommentStore $commentStore)
getIdField()
Get the DB field name associated with the ID list.
getBits()
Get the current deletion bitfield value.
getAuthorNameField()
Get the DB field name storing user names.
setBits( $bits)
Set the visibility of the item.
canViewContent()
Returns true if the current user can view the item text/file.
getHTML()
Get the HTML of the list item.
canView()
Returns true if the current user can view the item.
getAuthorIdField()
Get the DB field name storing user ids.
getApiData(ApiResult $result)
Get the return information about the revision for the API.
getTimestampField()
Get the DB field name storing timestamps.
stdClass $row
The database result row.
RevisionListBase $list
The parent.
getLinkRenderer()
Returns an instance of LinkRenderer.
List for revision table items for a single page.
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.