18 $revRecord = MediaWikiServices::getInstance()
19 ->getRevisionFactory()
20 ->newRevisionFromArchiveRow(
22 IDBAccessObject::READ_NORMAL,
32 return 'ar_timestamp';
37 return 'ar_timestamp';
47 return 'ar_user_text';
57 # Convert DB timestamp to MW timestamp
58 return $this->revisionRecord->getTimestamp();
63 $dbw = MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase();
64 $dbw->newUpdateQueryBuilder()
66 ->set( [
'ar_deleted' => $bits ] )
68 'ar_namespace' => $this->list->getPage()->getNamespace(),
69 'ar_title' => $this->list->getPage()->getDBkey(),
71 'ar_timestamp' => $this->row->ar_timestamp,
72 'ar_rev_id' => $this->row->ar_rev_id,
73 'ar_deleted' => $this->getBits()
75 ->caller( __METHOD__ )->execute();
77 return (
bool)$dbw->affectedRows();
82 $date = $this->list->getLanguage()->userTimeAndDate(
83 $this->revisionRecord->getTimestamp(), $this->list->getUser() );
86 return htmlspecialchars( $date );
90 SpecialPage::getTitleFor(
'Undelete' ),
94 'target' => $this->list->getPageName(),
95 'timestamp' => $this->revisionRecord->getTimestamp()
103 return $this->list->msg(
'diff' )->escaped();
107 SpecialPage::getTitleFor(
'Undelete' ),
108 $this->list->msg(
'diff' )->text(),
111 'target' => $this->list->getPageName(),
113 '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.Override this function. string|false
getRevisionLink()
Get the HTML link to the revision text.Overridden by RevDelArchiveItem. string
getId()
Get the ID, as it would appear in the ids URL parameter.int|string
getIdField()
Get the DB field name associated with the ID list.Override this function. string|null
getDiffLink()
Get the HTML link to the diff.Overridden by RevDelArchiveItem string
setBits( $bits)
Set the visibility of the item.This should do any necessary DB queries.The DB update query should hav...
getAuthorIdField()
Get the DB field name storing user ids.Override this function. string|false
getTimestampField()
Get the DB field name storing timestamps.Override this function. string|false
static initRevisionRecord( $list, $row)
Create RevisionRecord object from $row sourced from $list.RevisionRecord
getAuthorActorField()
Get the DB field name storing actor ids.Override this function. 1.31 string|false
canViewContent()
Returns true if the current user can view the item text/file.bool