MediaWiki  REL1_19
ForeignDBFile Class Reference

Foreign file with an accessible MediaWiki database. More...

Inheritance diagram for ForeignDBFile:
Collaboration diagram for ForeignDBFile:

List of all members.

Public Member Functions

 delete ($reason, $suppress=false)
 Delete all versions of the file.
 getDescriptionText ()
 getDescriptionUrl ()
 move ($target)
 getLinksTo inherited
 publish ($srcPath, $flags=0)
 Move or copy a file to its public location.
 recordUpload ($oldver, $desc, $license= '', $copyStatus= '', $source= '', $watch=false, $timestamp=false)
 Record a file upload in the upload log and the image table.
 restore ($versions=array(), $unsuppress=false)
 Restore all or specified deleted revisions to the given file.

Static Public Member Functions

static newFromRow ($row, $repo)
 Create a ForeignDBFile from a title Do not call this except from inside a repo class.
static newFromTitle ($title, $repo, $unused=null)

Detailed Description

Foreign file with an accessible MediaWiki database.

Definition at line 14 of file ForeignDBFile.php.


Member Function Documentation

ForeignDBFile::delete ( reason,
suppress = false 
)

Delete all versions of the file.

Moves the files into an archive directory (or deletes them) and removes the database rows.

Cache purging is done; logging is caller's responsibility.

Parameters:
$reason
$suppress
Returns:
FileRepoStatus object.

Reimplemented from LocalFile.

Definition at line 55 of file ForeignDBFile.php.

References File\readOnlyError().

Here is the call graph for this function:

Returns:
string

Reimplemented from LocalFile.

Definition at line 74 of file ForeignDBFile.php.

Returns:
string

Reimplemented from LocalFile.

Definition at line 66 of file ForeignDBFile.php.

ForeignDBFile::move ( target)

getLinksTo inherited

getExifData inherited isLocal inherited wasDeleted inherited Move file to the new title

Move current, old version and all thumbnails to the new filename. Old file is deleted.

Cache purging is done; checks for validity and logging are caller's responsibility

Parameters:
$targetTitle New file name
Returns:
FileRepoStatus object.

Reimplemented from LocalFile.

Definition at line 59 of file ForeignDBFile.php.

References File\readOnlyError().

Here is the call graph for this function:

static ForeignDBFile::newFromRow ( row,
repo 
) [static]

Create a ForeignDBFile from a title Do not call this except from inside a repo class.

Parameters:
$row
$repo
Returns:
ForeignDBFile

Reimplemented from LocalFile.

Definition at line 35 of file ForeignDBFile.php.

References $file, File\$repo, File\$title, and Title\makeTitle().

Here is the call graph for this function:

static ForeignDBFile::newFromTitle ( title,
repo,
unused = null 
) [static]
Parameters:
$title
$repo
$unused
Returns:
ForeignDBFile

Reimplemented from LocalFile.

Definition at line 22 of file ForeignDBFile.php.

References File\$repo, and File\$title.

ForeignDBFile::publish ( srcPath,
flags = 0 
)

Move or copy a file to its public location.

If a file exists at the destination, move it to an archive. Returns a FileRepoStatus object with the archive name in the "value" member on success.

The archive name should be passed through to recordUpload for database registration.

Parameters:
$srcPathString: local filesystem path to the source image
$flagsInteger: a bitwise combination of: File::DELETE_SOURCE Delete the source file, i.e. move rather than copy
Returns:
FileRepoStatus object. On success, the value member contains the archive name, or an empty string if it was a new file.

Reimplemented from LocalFile.

Definition at line 42 of file ForeignDBFile.php.

References File\readOnlyError().

Here is the call graph for this function:

ForeignDBFile::recordUpload ( oldver,
desc,
license = '',
copyStatus = '',
source = '',
watch = false,
timestamp = false 
)

Record a file upload in the upload log and the image table.

Reimplemented from LocalFile.

Definition at line 46 of file ForeignDBFile.php.

References File\readOnlyError().

Here is the call graph for this function:

ForeignDBFile::restore ( versions = array(),
unsuppress = false 
)

Restore all or specified deleted revisions to the given file.

Permissions and logging are left to the caller.

May throw database exceptions on error.

Parameters:
$versionsset of record ids of deleted items to restore, or empty to restore all revisions.
$unsuppressBoolean
Returns:
FileRepoStatus

Reimplemented from LocalFile.

Definition at line 51 of file ForeignDBFile.php.

References File\readOnlyError().

Here is the call graph for this function:


The documentation for this class was generated from the following file: