42 return 'fa_timestamp';
50 return 'fa_user_text';
58 return $this->row->fa_id;
63 $dbw->update(
'filearchive',
64 [
'fa_deleted' => $bits ],
66 'fa_id' => $this->row->fa_id,
67 'fa_deleted' => $this->getBits(),
72 return (
bool)$dbw->affectedRows();
76 $date = $this->
list->getLanguage()->userTimeAndDate(
77 $this->file->getTimestamp(), $this->list->getUser() );
81 $link = htmlspecialchars( $date );
83 $undelete = SpecialPage::getTitleFor(
'Undelete' );
84 $key = $this->file->getKey();
87 'target' => $this->
list->title->getPrefixedText(),
89 'token' => $this->list->getUser()->getEditToken( $key )
94 $link =
'<span class="history-deleted">' .
$link .
'</span>';
102 $user = $this->
list->getUser();
104 'title' => $this->
list->title->getPrefixedText(),
105 'timestamp' =>
wfTimestamp( TS_ISO_8601, $file->getTimestamp() ),
106 'width' => $file->getWidth(),
107 'height' => $file->getHeight(),
108 'size' => $file->getSize(),
109 'userhidden' => (bool)$file->isDeleted( Revision::DELETED_USER ),
110 'commenthidden' => (bool)$file->isDeleted( Revision::DELETED_COMMENT ),
111 'contenthidden' => (bool)$this->
isDeleted(),
115 'url' => SpecialPage::getTitleFor(
'Revisiondelete' )->getLinkURL(
117 'target' => $this->
list->title->getPrefixedText(),
118 'file' => $file->getKey(),
119 'token' => $user->getEditToken( $file->getKey() )
124 if ( $file->userCan( Revision::DELETED_USER, $user ) ) {
126 'userid' => $file->getUser(
'id' ),
127 'user' => $file->getUser(
'text' ),
130 if ( $file->userCan( Revision::DELETED_COMMENT, $user ) ) {
132 'comment' => $file->getRawDescription(),
140 return $this->lockFile->acquireFileLock();
144 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.
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.
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.
$row
The database result row.
__construct( $list, $row)
getLinkRenderer()
Returns an instance of LinkRenderer.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
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