MediaWiki
REL1_19
|
Foreign file with an accessible MediaWiki database. More...
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) |
Foreign file with an accessible MediaWiki database.
Definition at line 14 of file ForeignDBFile.php.
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.
$reason | |
$suppress |
Reimplemented from LocalFile.
Definition at line 55 of file ForeignDBFile.php.
References File\readOnlyError().
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
$target | Title New file name |
Reimplemented from LocalFile.
Definition at line 59 of file ForeignDBFile.php.
References File\readOnlyError().
static ForeignDBFile::newFromRow | ( | $ | row, |
$ | repo | ||
) | [static] |
Create a ForeignDBFile from a title Do not call this except from inside a repo class.
$row | |
$repo |
Reimplemented from LocalFile.
Definition at line 35 of file ForeignDBFile.php.
References $file, File\$repo, File\$title, and Title\makeTitle().
static ForeignDBFile::newFromTitle | ( | $ | title, |
$ | repo, | ||
$ | unused = null |
||
) | [static] |
$title | |
$repo | |
$unused |
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.
$srcPath | String: local filesystem path to the source image |
$flags | Integer: a bitwise combination of: File::DELETE_SOURCE Delete the source file, i.e. move rather than copy |
Reimplemented from LocalFile.
Definition at line 42 of file ForeignDBFile.php.
References File\readOnlyError().
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().
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.
$versions | set of record ids of deleted items to restore, or empty to restore all revisions. |
$unsuppress | Boolean |
Reimplemented from LocalFile.
Definition at line 51 of file ForeignDBFile.php.
References File\readOnlyError().