15use Wikimedia\Timestamp\TimestampFormat as TS;
30 $this->lockFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
31 ->newFile(
$row->fa_name );
36 return ArchivedFile::newFromRow(
$row );
46 return 'fa_timestamp';
56 return 'fa_user_text';
66 return $this->row->fa_id;
71 $dbw = $this->dbProvider->getPrimaryDatabase();
72 $dbw->newUpdateQueryBuilder()
73 ->update(
'filearchive' )
74 ->set( [
'fa_deleted' => $bits ] )
76 'fa_id' => $this->row->fa_id,
77 'fa_deleted' => $this->getBits(),
79 ->caller( __METHOD__ )->execute();
81 return (
bool)$dbw->affectedRows();
86 $date = $this->list->getLanguage()->userTimeAndDate(
87 $this->file->getTimestamp(), $this->list->getUser() );
91 $link = htmlspecialchars( $date );
93 $undelete = SpecialPage::getTitleFor(
'Undelete' );
94 $key = $this->file->getKey();
97 'target' => $this->list->getPageName(),
99 'token' => $this->list->getUser()->getEditToken( $key )
104 $link =
'<span class="history-deleted">' . $link .
'</span>';
113 $user = $this->list->getUser();
115 'title' => $this->list->getPageName(),
121 'commenthidden' => (bool)
$file->
isDeleted( File::DELETED_COMMENT ),
122 'contenthidden' => (bool)$this->
isDeleted(),
126 'url' => SpecialPage::getTitleFor(
'Revisiondelete' )->getLinkURL(
128 'target' => $this->list->getPageName(),
129 'file' =>
$file->getKey(),
130 'token' => $user->getEditToken(
$file->getKey() )
138 'userid' => $uploader->getId(),
139 'user' => $uploader->getName(),
143 if ( $comment !==
'' ) {
145 'comment' => $comment,
154 return $this->lockFile->acquireFileLock();
159 return $this->lockFile->releaseFileLock();
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.
Parent class for all special pages.
static initFile( $list, $row)
Create file object from $row sourced from $list.mixed
getIdField()
Get the DB field name associated with the ID list.Override this function. string|null
getAuthorNameField()
Get the DB field name storing user names.Override this function. string|false
getApiData(ApiResult $result)
Get the return information about the revision for the API.1.23 array Data for the API result
unlock()
Unlock the item against changes outside of the DB.Status 1.28
getTimestampField()
Get the DB field name storing timestamps.Override this function. string|false
setBits( $bits)
Set the visibility of the item.This should do any necessary DB queries.The DB update query should hav...
__construct(RevisionListBase $list, $row)
getLink()
Get the link to the file.Overridden by RevDelArchivedFileItem. string
lock()
Lock the item against changes outside of the DB.Status 1.28
getId()
Get the ID, as it would appear in the ids URL parameter.int|string
getAuthorActorField()
Get the DB field name storing actor ids.Override this function. 1.31 string|false
getAuthorIdField()
Get the DB field name storing user ids.Override this function. string|false
Item class for an oldimage table row.
canViewContent()
Returns true if the current user can view the item text/file.bool