39 $this->lockFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
40 ->newFile(
$row->fa_name );
44 return ArchivedFile::newFromRow(
$row );
52 return 'fa_timestamp';
60 return 'fa_user_text';
68 return $this->row->fa_id;
72 $dbw = $this->dbProvider->getPrimaryDatabase();
73 $dbw->newUpdateQueryBuilder()
74 ->update(
'filearchive' )
75 ->set( [
'fa_deleted' => $bits ] )
77 'fa_id' => $this->row->fa_id,
78 'fa_deleted' => $this->getBits(),
80 ->caller( __METHOD__ )->execute();
82 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>';
112 $user = $this->list->getUser();
114 'title' => $this->list->getPageName(),
120 'commenthidden' => (bool)
$file->
isDeleted( File::DELETED_COMMENT ),
121 'contenthidden' => (bool)$this->
isDeleted(),
125 'url' => SpecialPage::getTitleFor(
'Revisiondelete' )->getLinkURL(
127 'target' => $this->list->getPageName(),
128 'file' =>
$file->getKey(),
129 'token' => $user->getEditToken(
$file->getKey() )
137 'userid' => $uploader->getId(),
138 'user' => $uploader->getName(),
142 if ( $comment !==
'' ) {
144 'comment' => $comment,
152 return $this->lockFile->acquireFileLock();
156 return $this->lockFile->releaseFileLock();
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Local file in the wiki's own database.
getWidth( $page=1)
Return the width of the image.
getSize()
Returns the size of the image file, in bytes.
getHeight( $page=1)
Return the height of the image.
getDescription( $audience=self::FOR_PUBLIC, ?Authority $performer=null)
getUploader(int $audience=self::FOR_PUBLIC, ?Authority $performer=null)
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.