Go to the documentation of this file.
106 $this->
title =
false;
108 $this->group =
'deleted';
114 $this->metadata =
'';
115 $this->mime =
"unknown/unknown";
116 $this->media_type =
'';
117 $this->description =
'';
119 $this->user_text =
'';
120 $this->timestamp =
null;
122 $this->dataLoaded =
false;
140 throw new MWException(
"No specifications provided to ArchivedFile constructor." );
149 public function load() {
150 if ( $this->dataLoaded ) {
155 if ( $this->
id > 0 ) {
162 if ( $this->
title ) {
163 $conds[
'fa_name'] = $this->
title->getDBkey();
166 if ( !count( $conds ) ) {
167 throw new MWException(
"No specific information for retrieving archived file" );
171 $this->dataLoaded =
true;
173 $row =
$dbr->selectRow(
175 self::selectFields(),
178 array(
'ORDER BY' =>
'fa_timestamp DESC' )
188 throw new MWException(
'This title does not correspond to an image page.' );
203 $file->loadFromRow( $row );
232 'fa_deleted_timestamp',
244 $this->
id = intval( $row->fa_id );
245 $this->
name = $row->fa_name;
246 $this->archive_name = $row->fa_archive_name;
247 $this->group = $row->fa_storage_group;
248 $this->
key = $row->fa_storage_key;
249 $this->size = $row->fa_size;
250 $this->bits = $row->fa_bits;
251 $this->width = $row->fa_width;
252 $this->height = $row->fa_height;
253 $this->metadata = $row->fa_metadata;
254 $this->mime =
"$row->fa_major_mime/$row->fa_minor_mime";
255 $this->media_type = $row->fa_media_type;
256 $this->description = $row->fa_description;
257 $this->
user = $row->fa_user;
258 $this->user_text = $row->fa_user_text;
259 $this->timestamp = $row->fa_timestamp;
260 $this->deleted = $row->fa_deleted;
261 if ( isset( $row->fa_sha1 ) ) {
262 $this->sha1 = $row->fa_sha1;
290 public function getID() {
299 public function exists() {
302 return $this->exists;
309 public function getKey() {
396 if ( !isset( $this->handler ) ) {
409 if ( $this->
getHandler() && $this->handler->isMultiPage( $this ) ) {
410 $this->
pageCount = $this->handler->pageCount( $this );
466 if (
$type ==
'text' ) {
468 } elseif (
$type ==
'id' ) {
557 return ( $this->deleted & $field ) == $field;
loadFromRow( $row)
Load ArchivedFile object fields from a DB row.
int $deleted
Bitfield akin to rev_deleted *.
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
string $sha1
SHA-1 hash of file content *.
getKey()
Return the FileStore key.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
getTimestamp()
Return upload timestamp.
string $metadata
Metadata string *.
bool $dataLoaded
Whether or not all this has been loaded from the database (loadFromXxx) *.
string $group
FileStore storage group *.
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
isDeleted( $field)
for file or revision rows
string $key
FileStore SHA-1 key *.
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this revision,...
getStorageKey()
Return the FileStore key (overriding base File class)
static getHashFromKey( $key)
Gets the SHA1 hash from a storage key.
static normalizeTitle( $title, $exception=false)
Given a string or Title object return either a valid Title object with namespace NS_FILE or null.
string $archive_name
Original base filename *.
getMetadata()
Get handler-specific metadata.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add in any and then calling but I prefer the flexibility This should also do the output encoding The system allocates a global one in $wgOut Title Represents the title of an and does all the work of translating among various forms such as plain database key
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
getSize()
Return the size of the image file, in bytes.
load()
Loads a file object from the filearchive table.
getUserText()
Return the user name of the uploader.
getDBkey()
Get the main part with underscores.
getHandler()
Get a MediaHandler instance for this file.
int $id
filearchive row ID *
__construct( $title, $id=0, $key='')
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
getMimeType()
Returns the mime type of the file.
getTitle()
Return the associated title object.
pageCount()
Returns the number of pages of a multipage document, or false for documents which aren't multipage do...
getVisibility()
Returns the deletion bitfield.
int $user
User ID of uploader *.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
int $size
File size in bytes *.
userCan( $field, User $user=null)
Determine if the current user is allowed to view a particular field of this FileStore image file,...
string $user_text
User name of uploader *.
getDescription()
Return upload description.
const TS_MW
MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same user
Class representing a row of the 'filearchive' table.
getSha1()
Get the SHA-1 base 36 hash of the file.
getName()
Return the file name.
getGroup()
Return the FileStore storage group.
if(PHP_SAPI !='cli') $file
getWidth()
Return the width of the image.
getRawUserText()
Return the user name of the uploader.
getUser( $type='text')
Returns ID or name of user who uploaded the file.
string $timestamp
Time of upload *.
Represents a title within MediaWiki.
string $pageCount
Number of pages of a multipage document, or false for documents which aren't multipage documents.
getRawDescription()
Return upload description.
string $description
Upload description *.
getHeight()
Return the height of the image.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
getBits()
Return the bits of the image file, in bytes.
static selectFields()
Fields in the filearchive table.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getRawUser()
Return the user ID of the uploader.
string $media_type
Media type *.
static newFromRow( $row)
Loads a file object from the filearchive table.
getMediaType()
Return the type of the media in the file.