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->getPageName(),
97 'token' => $this->list->getUser()->getEditToken( $key )
102 $link =
'<span class="history-deleted">' . $link .
'</span>';
110 $user = $this->list->
getUser();
112 'title' => $this->list->getPageName(),
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->getPageName(),
126 'file' =>
$file->getKey(),
127 'token' => $user->getEditToken(
$file->getKey() )
135 'userid' => $uploader->getId(),
136 'user' => $uploader->getName(),
142 'comment' => $comment,
150 return $this->lockFile->acquireFileLock();
154 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.
getUser( $type='text')
Returns ID or name of user who uploaded the file STUB.
Class to represent a local file in the wiki's own database.
getWidth( $page=1)
Return the width of the image.
getUploader(int $audience=self::FOR_PUBLIC, Authority $performer=null)
getSize()
Returns the size of the image file, in bytes.
getDescription( $audience=self::FOR_PUBLIC, Authority $performer=null)
getHeight( $page=1)
Return the height of the image.
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.
stdClass $row
The database result row.
getLinkRenderer()
Returns an instance of LinkRenderer.
List for revision table items for a single page.
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,...