42 $this->lockFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
43 ->newFile(
$row->fa_name );
47 return ArchivedFile::newFromRow(
$row );
55 return 'fa_timestamp';
63 return 'fa_user_text';
71 return $this->row->fa_id;
75 $dbw = $this->dbProvider->getPrimaryDatabase();
76 $dbw->newUpdateQueryBuilder()
77 ->update(
'filearchive' )
78 ->set( [
'fa_deleted' => $bits ] )
80 'fa_id' => $this->row->fa_id,
81 'fa_deleted' => $this->getBits(),
83 ->caller( __METHOD__ )->execute();
85 return (
bool)$dbw->affectedRows();
89 $date = $this->list->getLanguage()->userTimeAndDate(
90 $this->file->getTimestamp(), $this->list->getUser() );
94 $link = htmlspecialchars( $date );
96 $undelete = SpecialPage::getTitleFor(
'Undelete' );
97 $key = $this->file->getKey();
100 'target' => $this->list->getPageName(),
102 'token' => $this->list->getUser()->getEditToken( $key )
107 $link =
'<span class="history-deleted">' . $link .
'</span>';
115 $user = $this->list->getUser();
117 'title' => $this->list->getPageName(),
123 'commenthidden' => (bool)
$file->
isDeleted( File::DELETED_COMMENT ),
124 'contenthidden' => (bool)$this->
isDeleted(),
128 'url' => SpecialPage::getTitleFor(
'Revisiondelete' )->getLinkURL(
130 'target' => $this->list->getPageName(),
131 'file' =>
$file->getKey(),
132 'token' => $user->getEditToken(
$file->getKey() )
140 'userid' => $uploader->getId(),
141 'user' => $uploader->getName(),
145 if ( $comment !==
'' ) {
147 'comment' => $comment,
155 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.
getIdField()
Get the DB field name associated with the ID list.
getAuthorNameField()
Get the DB field name storing user names.
getApiData(ApiResult $result)
Get the return information about the revision for the API.
unlock()
Unlock the item against changes outside of the DB.
getTimestampField()
Get the DB field name storing timestamps.
setBits( $bits)
Set the visibility of the item.
__construct(RevisionListBase $list, $row)
getLink()
Get the link to the file.
lock()
Lock the item against changes outside of the DB.
getId()
Get the ID, as it would appear in the ids URL parameter.
getAuthorActorField()
Get the DB field name storing actor ids.
getAuthorIdField()
Get the DB field name storing user ids.
Item class for an oldimage table row.
canViewContent()
Returns true if the current user can view the item text/file.