diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2008-08-15 01:29:47 +0200 |
commit | 370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch) | |
tree | 491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/filerepo/ForeignDBFile.php | |
parent | f4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff) |
Update auf 1.13.0
Diffstat (limited to 'includes/filerepo/ForeignDBFile.php')
-rw-r--r-- | includes/filerepo/ForeignDBFile.php | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/includes/filerepo/ForeignDBFile.php b/includes/filerepo/ForeignDBFile.php index 4d11640a..eed26048 100644 --- a/includes/filerepo/ForeignDBFile.php +++ b/includes/filerepo/ForeignDBFile.php @@ -1,34 +1,52 @@ <?php +/** + * @ingroup FileRepo + */ class ForeignDBFile extends LocalFile { - static function newFromTitle( $title, $repo ) { + static function newFromTitle( $title, $repo, $unused = null ) { return new self( $title, $repo ); } + /** + * Create a ForeignDBFile from a title + * Do not call this except from inside a repo class. + */ + static function newFromRow( $row, $repo ) { + $title = Title::makeTitle( NS_IMAGE, $row->img_name ); + $file = new self( $title, $repo ); + $file->loadFromRow( $row ); + return $file; + } + function getCacheKey() { if ( $this->repo->hasSharedCache ) { $hashedName = md5($this->name); - return wfForeignMemcKey( $this->repo->dbName, $this->repo->tablePrefix, + return wfForeignMemcKey( $this->repo->dbName, $this->repo->tablePrefix, 'file', $hashedName ); } else { return false; } } - function publish( /*...*/ ) { + function publish( $srcPath, $flags = 0 ) { $this->readOnlyError(); } - function recordUpload( /*...*/ ) { + function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', + $watch = false, $timestamp = false ) { $this->readOnlyError(); } - function restore( /*...*/ ) { + function restore( $versions = array(), $unsuppress = false ) { $this->readOnlyError(); } - function delete( /*...*/ ) { + function delete( $reason, $suppress = false ) { $this->readOnlyError(); } - + function move( $target ) { + $this->readOnlyError(); + } + function getDescriptionUrl() { // Restore remote behaviour return File::getDescriptionUrl(); @@ -39,4 +57,3 @@ class ForeignDBFile extends LocalFile { return File::getDescriptionText(); } } - |