42 return 'fa_timestamp';
50 return 'fa_user_text';
54 return $this->row->fa_id;
59 $dbw->update(
'filearchive',
60 [
'fa_deleted' => $bits ],
62 'fa_id' => $this->row->fa_id,
63 'fa_deleted' => $this->getBits(),
68 return (
bool)$dbw->affectedRows();
72 $date = $this->list->getLanguage()->userTimeAndDate(
73 $this->file->getTimestamp(), $this->list->getUser() );
77 $link = htmlspecialchars( $date );
80 $key = $this->file->getKey();
83 'target' => $this->list->title->getPrefixedText(),
85 'token' => $this->list->getUser()->getEditToken( $key )
90 $link =
'<span class="history-deleted">' .
$link .
'</span>';
100 'title' => $this->list->title->getPrefixedText(),
101 'timestamp' =>
wfTimestamp( TS_ISO_8601, $file->getTimestamp() ),
102 'width' => $file->getWidth(),
103 'height' => $file->getHeight(),
104 'size' => $file->getSize(),
107 'contenthidden' => (bool)$this->
isDeleted(),
113 'target' => $this->list->title->getPrefixedText(),
114 'file' => $file->getKey(),
115 'token' => $user->getEditToken( $file->getKey() )
122 'userid' => $file->getUser(
'id' ),
123 'user' => $file->getUser(
'text' ),
128 'comment' => $file->getRawDescription(),
136 return $this->lockFile->acquireFileLock();
140 return $this->lockFile->releaseFileLock();
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
This class represents the result of the API operations.
static newFromRow( $row)
Loads a file object from the filearchive table.
Class to represent a local file in the wiki's own database.
getUser( $type='text')
Returns ID or name of user who uploaded the file.
static singleton()
Get a RepoGroup instance.
Item class for a filearchive table row.
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.
getLink()
Get the link to the file.
lock()
Lock the item against changes outside of the DB.
__construct( $list, $row)
getId()
Get the ID, as it would appear in the ids URL parameter.
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.
$row
The database result row.
__construct( $list, $row)
getLinkRenderer()
Returns an instance of LinkRenderer.
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,...
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
usually copyright or history_copyright This message must be in HTML not wikitext & $link