00001 <?php
00002
00006 class ForeignDBFile extends LocalFile {
00007 static function newFromTitle( $title, $repo, $unused = null ) {
00008 return new self( $title, $repo );
00009 }
00010
00015 static function newFromRow( $row, $repo ) {
00016 $title = Title::makeTitle( NS_FILE, $row->img_name );
00017 $file = new self( $title, $repo );
00018 $file->loadFromRow( $row );
00019 return $file;
00020 }
00021
00022 function getCacheKey() {
00023 if ( $this->repo->hasSharedCache() ) {
00024 $hashedName = md5($this->name);
00025 return wfForeignMemcKey( $this->repo->dbName, $this->repo->tablePrefix,
00026 'file', $hashedName );
00027 } else {
00028 return false;
00029 }
00030 }
00031
00032 function publish( $srcPath, $flags = 0 ) {
00033 $this->readOnlyError();
00034 }
00035
00036 function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
00037 $watch = false, $timestamp = false ) {
00038 $this->readOnlyError();
00039 }
00040 function restore( $versions = array(), $unsuppress = false ) {
00041 $this->readOnlyError();
00042 }
00043 function delete( $reason, $suppress = false ) {
00044 $this->readOnlyError();
00045 }
00046 function move( $target ) {
00047 $this->readOnlyError();
00048 }
00049
00050 function getDescriptionUrl() {
00051
00052 return File::getDescriptionUrl();
00053 }
00054
00055 function getDescriptionText() {
00056
00057 return File::getDescriptionText();
00058 }
00059 }