35 $this->revision = static::initRevision(
$list,
$row );
54 return 'rev_timestamp';
62 return 'rev_user_text';
70 return $this->revision->userCan(
71 RevisionRecord::DELETED_RESTRICTED, $this->list->getUser()
76 return $this->revision->userCan(
77 RevisionRecord::DELETED_TEXT, $this->list->getUser()
82 return $this->revision->getVisibility();
88 $dbw->update(
'revision',
89 [
'rev_deleted' => $bits ],
91 'rev_id' => $this->revision->getId(),
92 'rev_page' => $this->revision->getPage(),
93 'rev_deleted' => $this->
getBits()
97 if ( !$dbw->affectedRows() ) {
102 $dbw->update(
'recentchanges',
104 'rc_deleted' => $bits,
108 'rc_this_oldid' => $this->revision->getId(),
110 'rc_timestamp' => $dbw->timestamp( $this->revision->getTimestamp() ),
119 return $this->revision->isDeleted( RevisionRecord::DELETED_TEXT );
123 return ( $newBits & RevisionRecord::DELETED_TEXT )
124 && $this->list->getCurrent() == $this->
getId();
133 $date = $this->list->getLanguage()->userTimeAndDate(
134 $this->revision->getTimestamp(), $this->list->getUser() );
137 return htmlspecialchars( $date );
145 'oldid' => $this->revision->getId(),
158 return $this->list->msg(
'diff' )->escaped();
162 $this->list->msg(
'diff' )->text(),
165 'diff' => $this->revision->getId(),
178 $difflink = $this->list->msg(
'parentheses' )
184 $revlink =
"<span class=\"history-deleted\">$revlink</span>";
186 $content =
"$difflink $revlink $userlink $comment";
193 $this->list->getContext()
196 $attribs[
'class'] = implode(
' ', $classes );
205 return $this->row->ts_tags;
210 $user = $this->list->
getUser();
212 'id' => $rev->getId(),
213 'timestamp' =>
wfTimestamp( TS_ISO_8601, $rev->getTimestamp() ),
214 'userhidden' => (
bool)$rev->isDeleted( RevisionRecord::DELETED_USER ),
215 'commenthidden' => (bool)$rev->isDeleted( RevisionRecord::DELETED_COMMENT ),
216 'texthidden' => (bool)$rev->isDeleted( RevisionRecord::DELETED_TEXT ),
218 if ( $rev->userCan( RevisionRecord::DELETED_USER, $user ) ) {
220 'userid' => $rev->getUser( RevisionRecord::FOR_THIS_USER ),
221 'user' => $rev->getUserText( RevisionRecord::FOR_THIS_USER ),
224 if ( $rev->userCan( RevisionRecord::DELETED_COMMENT, $user ) ) {
226 'comment' => $rev->getComment( RevisionRecord::FOR_THIS_USER ),