33 return 'log_timestamp';
41 return 'log_user_text';
50 $this->row, RevisionRecord::DELETED_RESTRICTED, $this->list->getUser()
59 return (
int)$this->row->log_deleted;
65 $dbw->update(
'logging',
66 [
'log_deleted' => $bits ],
68 'log_id' => $this->row->log_id,
69 'log_deleted' => $this->getBits()
74 if ( !$dbw->affectedRows() ) {
79 $dbw->update(
'recentchanges',
81 'rc_deleted' => $bits,
82 'rc_patrolled' => RecentChange::PRC_AUTOPATROLLED
85 'rc_logid' => $this->row->log_id,
86 'rc_timestamp' => $this->row->log_timestamp
95 $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate(
96 $this->row->log_timestamp, $this->list->getUser() ) );
97 $title = Title::makeTitle( $this->row->log_namespace, $this->row->log_title );
99 $formatter->setContext( $this->list->getContext() );
104 SpecialPage::getTitleFor(
'Log' ),
105 $this->list->msg(
'log' )->text(),
107 [
'page' =>
$title->getPrefixedText() ]
109 $loglink = $this->list->msg(
'parentheses' )->rawParams( $loglink )->escaped();
111 $action = $formatter->getActionText();
113 $comment = CommentStore::getStore()->getComment(
'log_comment', $this->row )->text;
114 $comment = $this->list->getLanguage()->getDirMark()
118 $comment =
'<span class="history-deleted">' . $comment .
'</span>';
121 return "<li>$loglink $date $action $comment</li>";
126 $user = $this->list->getUser();
128 'id' => $logEntry->getId(),
129 'type' => $logEntry->getType(),
130 'action' => $logEntry->getSubtype(),
141 'userid' => $this->row->log_user,
142 'user' => $this->row->log_user_text,
147 'comment' => CommentStore::getStore()->getComment(
'log_comment', $this->row )
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 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...
static userCan( $row, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row,...
static isDeleted( $row, $field)
Abstract base class for deletable items.
Item class for a logging table row.
getAuthorActorField()
Get the DB field name storing actor ids.
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.
getLinkRenderer()
Returns an instance of LinkRenderer.