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->newUpdateQueryBuilder()
72 ->update(
'filearchive' )
73 ->set( [
'fa_deleted' => $bits ] )
75 'fa_id' => $this->row->fa_id,
76 'fa_deleted' => $this->getBits(),
78 ->caller( __METHOD__ )->execute();
80 return (
bool)$dbw->affectedRows();
84 $date = $this->list->getLanguage()->userTimeAndDate(
85 $this->file->getTimestamp(), $this->list->getUser() );
89 $link = htmlspecialchars( $date );
91 $undelete = SpecialPage::getTitleFor(
'Undelete' );
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(),
119 'contenthidden' => (bool)$this->
isDeleted(),
123 'url' => SpecialPage::getTitleFor(
'Revisiondelete' )->getLinkURL(
125 'target' => $this->list->getPageName(),
126 'file' =>
$file->getKey(),
127 'token' => $user->getEditToken(
$file->getKey() )
135 'userid' => $uploader->getId(),
136 'user' => $uploader->getName(),
140 if ( $comment !==
'' ) {
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.
getWidth( $page=1)
Return the width of the image @stable to override.
getUploader(int $audience=self::FOR_PUBLIC, Authority $performer=null)
getSize()
Returns the size of the image file, in bytes @stable to override.
getDescription( $audience=self::FOR_PUBLIC, Authority $performer=null)
getHeight( $page=1)
Return the height of the image @stable to override.
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.
stdClass $row
The database result row.
getLinkRenderer()
Returns an instance of LinkRenderer.
List for revision table items for a single page.