51 return 'log_timestamp';
59 return 'log_user_text';
67 return LogEventsList::userCan(
68 $this->row, RevisionRecord::DELETED_RESTRICTED, $this->list->getUser()
77 return (
int)$this->row->log_deleted;
83 $dbw->update(
'logging',
84 [
'log_deleted' => $bits ],
86 'log_id' => $this->row->log_id,
87 'log_deleted' => $this->getBits()
92 if ( !$dbw->affectedRows() ) {
97 $dbw->update(
'recentchanges',
99 'rc_deleted' => $bits,
100 'rc_patrolled' => RecentChange::PRC_AUTOPATROLLED
103 'rc_logid' => $this->row->log_id,
104 'rc_timestamp' => $this->row->log_timestamp
113 $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
114 $this->row->log_timestamp, $this->list->getUser() ) );
115 $title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
117 $formatter->setContext( $this->list->getContext() );
123 $this->list->msg(
'log' )->text(),
125 [
'page' =>
$title->getPrefixedText() ]
127 $loglink = $this->list->msg(
'parentheses' )->rawParams( $loglink )->escaped();
129 $action = $formatter->getActionText();
131 $comment = $this->commentStore->getComment(
'log_comment', $this->row )->text;
132 $comment = $this->list->getLanguage()->getDirMark()
136 $comment =
'<span class="history-deleted">' . $comment .
'</span>';
139 return "<li>$loglink $date $action $comment</li>";
143 $logEntry = DatabaseLogEntry::newFromRow( $this->row );
144 $user = $this->list->getUser();
146 'id' => $logEntry->getId(),
147 'type' => $logEntry->getType(),
148 'action' => $logEntry->getSubtype(),
159 'userid' => $this->row->log_user ?? 0,
160 'user' => $this->row->log_user_text,
165 '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 commentBlock( $comment, $title=null, $local=false, $wikiId=null, $useParentheses=true)
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty strin...
Abstract base class for deletable items.
Item class for a logging table row.
CommentStore $commentStore
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 getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...