Go to the documentation of this file.
37 $this->lockFile = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
38 ->newFile(
$row->fa_name );
50 return 'fa_timestamp';
58 return 'fa_user_text';
66 return $this->row->fa_id;
71 $dbw->update(
'filearchive',
72 [
'fa_deleted' => $bits ],
74 'fa_id' => $this->row->fa_id,
75 'fa_deleted' => $this->getBits(),
80 return (
bool)$dbw->affectedRows();
84 $date = $this->list->getLanguage()->userTimeAndDate(
85 $this->file->getTimestamp(), $this->list->getUser() );
89 $link = htmlspecialchars( $date );
92 $key = $this->file->getKey();
95 'target' => $this->list->title->getPrefixedText(),
97 'token' => $this->list->getUser()->getEditToken( $key )
102 $link =
'<span class="history-deleted">' . $link .
'</span>';
110 $user = $this->list->
getUser();
112 'title' => $this->list->title->getPrefixedText(),
117 'userhidden' => (bool)
$file->
isDeleted( RevisionRecord::DELETED_USER ),
118 'commenthidden' => (bool)
$file->
isDeleted( RevisionRecord::DELETED_COMMENT ),
119 'contenthidden' => (bool)$this->
isDeleted(),
125 'target' => $this->list->title->getPrefixedText(),
126 'file' =>
$file->getKey(),
127 'token' => $user->getEditToken(
$file->getKey() )
132 if (
$file->
userCan( RevisionRecord::DELETED_USER, $user ) ) {
138 if (
$file->
userCan( RevisionRecord::DELETED_COMMENT, $user ) ) {
140 'comment' =>
$file->getRawDescription(),
148 return $this->lockFile->acquireFileLock();
152 return $this->lockFile->releaseFileLock();
getId()
Get the ID, as it would appear in the ids URL parameter.
getTimestamp()
Stable to override.
getAuthorActorField()
Get the DB field name storing actor ids.
getUser( $type='text')
Returns user who uploaded the file @stable to override.
List for revision table items for a single page.
getTimestampField()
Get the DB field name storing timestamps.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
getSize()
Returns the size of the image file, in bytes @stable to override.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
getLink()
Get the link to the file.
unlock()
Unlock the item against changes outside of the DB.
lock()
Lock the item against changes outside of the DB.
getAuthorIdField()
Get the DB field name storing user ids.
This class represents the result of the API operations.
getLinkRenderer()
Returns an instance of LinkRenderer.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
getIdField()
Get the DB field name associated with the ID list.
Class to represent a local file in the wiki's own database.
getApiData(ApiResult $result)
Get the return information about the revision for the API.
canViewContent()
Returns true if the current user can view the item text/file.
Item class for an oldimage table row.
setBits( $bits)
Set the visibility of the item.
static initFile( $list, $row)
Create file object from $row sourced from $list.
__construct(RevisionListBase $list, $row)
getWidth( $page=1)
Return the width of the image @stable to override.
stdClass $row
The database result row.
getHeight( $page=1)
Return the height of the image @stable to override.
getAuthorNameField()
Get the DB field name storing user names.
static newFromRow( $row)
Loads a file object from the filearchive table Stable to override.
userCan( $field, User $user)
Determine if the current user is allowed to view a particular field of this image file,...