Public Member Functions | |
getCacheKey () | |
Get the memcached key. | |
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. | |
delete ($reason, $suppress=false) | |
Delete all versions of the file. | |
move ($target) | |
getLinksTo inherited | |
getDescriptionUrl () | |
isMultipage inherited | |
getDescriptionText () | |
Get the HTML text of the description page This is not used by ImagePage for local files, since (among other things) it skips the parser cache. | |
Static Public Member Functions | |
static | newFromTitle ($title, $repo, $unused=null) |
#@- | |
static | newFromRow ($row, $repo) |
Create a ForeignDBFile from a title Do not call this except from inside a repo class. |
Definition at line 6 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 43 of file ForeignDBFile.php.
References File::readOnlyError().
ForeignDBFile::getCacheKey | ( | ) |
Get the memcached key.
Reimplemented from LocalFile.
Definition at line 22 of file ForeignDBFile.php.
References wfForeignMemcKey().
ForeignDBFile::getDescriptionText | ( | ) |
Get the HTML text of the description page This is not used by ImagePage for local files, since (among other things) it skips the parser cache.
Reimplemented from LocalFile.
Definition at line 55 of file ForeignDBFile.php.
ForeignDBFile::getDescriptionUrl | ( | ) |
isMultipage inherited
pageCount inherited scaleHeight inherited getImageSize inherited Get the URL of the file description page.
Reimplemented from LocalFile.
Definition at line 50 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
$target | Title New file name |
Reimplemented from LocalFile.
Definition at line 46 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.
Reimplemented from LocalFile.
Definition at line 15 of file ForeignDBFile.php.
References $file, File::$repo, $row, File::$title, and Title::makeTitle().
static ForeignDBFile::newFromTitle | ( | $ | title, | |
$ | repo, | |||
$ | unused = null | |||
) | [static] |
#@-
Create a LocalFile from a title Do not call this except from inside a repo class.
Note: $unused param is only here to avoid an E_STRICT
Reimplemented from LocalFile.
Definition at line 7 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 the archive name on success or an empty string if it was a new file, and a wikitext-formatted WikiError object on failure.
The archive name should be passed through to recordUpload for database registration.
string | $sourcePath Local filesystem path to the source image | |
integer | $flags A bitwise combination of: File::DELETE_SOURCE Delete the source file, i.e. move rather than copy |
Reimplemented from LocalFile.
Definition at line 32 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 36 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. | |
$unuppress |
Reimplemented from LocalFile.
Definition at line 40 of file ForeignDBFile.php.
References File::readOnlyError().