31 $revRecord = MediaWikiServices::getInstance()
32 ->getRevisionFactory()
33 ->newRevisionFromArchiveRow(
35 IDBAccessObject::READ_NORMAL,
44 return 'ar_timestamp';
48 return 'ar_timestamp';
56 return 'ar_user_text';
64 # Convert DB timestamp to MW timestamp
65 return $this->revisionRecord->getTimestamp();
69 $dbw = MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase();
70 $dbw->newUpdateQueryBuilder()
72 ->set( [
'ar_deleted' => $bits ] )
74 'ar_namespace' => $this->list->getPage()->getNamespace(),
75 'ar_title' => $this->list->getPage()->getDBkey(),
77 'ar_timestamp' => $this->row->ar_timestamp,
78 'ar_rev_id' => $this->row->ar_rev_id,
79 'ar_deleted' => $this->getBits()
81 ->caller( __METHOD__ )->execute();
83 return (
bool)$dbw->affectedRows();
87 $date = $this->list->getLanguage()->userTimeAndDate(
88 $this->revisionRecord->getTimestamp(), $this->list->getUser() );
91 return htmlspecialchars( $date );
95 SpecialPage::getTitleFor(
'Undelete' ),
99 'target' => $this->list->getPageName(),
100 'timestamp' => $this->revisionRecord->getTimestamp()
107 return $this->list->msg(
'diff' )->escaped();
111 SpecialPage::getTitleFor(
'Undelete' ),
112 $this->list->msg(
'diff' )->text(),
115 'target' => $this->list->getPageName(),
117 'timestamp' => $this->revisionRecord->getTimestamp()
Parent class for all special pages.
Item class for a archive table row.
getAuthorNameField()
Get the DB field name storing user names.
getRevisionLink()
Get the HTML link to the revision text.
getId()
Get the ID, as it would appear in the ids URL parameter.
getIdField()
Get the DB field name associated with the ID list.
getDiffLink()
Get the HTML link to the diff.
setBits( $bits)
Set the visibility of the item.
getAuthorIdField()
Get the DB field name storing user ids.
getTimestampField()
Get the DB field name storing timestamps.
static initRevisionRecord( $list, $row)
Create RevisionRecord object from $row sourced from $list.
getAuthorActorField()
Get the DB field name storing actor ids.
canViewContent()
Returns true if the current user can view the item text/file.