All this functionality is now moved to File.php. for getDescriptionUrl there was no real need to subclass this method, for getDescriptionText() there was, but duplicating the code or changing the inheritence model of LocalFile and ForeignDBFile seems too much work if an isLocal in File.php suffices.
39 lines
934 B
PHP
39 lines
934 B
PHP
<?php
|
|
|
|
/**
|
|
* @ingroup FileRepo
|
|
*/
|
|
class ForeignDBFile extends LocalFile {
|
|
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_FILE, $row->img_name );
|
|
$file = new self( $title, $repo );
|
|
$file->loadFromRow( $row );
|
|
return $file;
|
|
}
|
|
|
|
function publish( $srcPath, $flags = 0 ) {
|
|
$this->readOnlyError();
|
|
}
|
|
|
|
function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
|
|
$watch = false, $timestamp = false ) {
|
|
$this->readOnlyError();
|
|
}
|
|
function restore( $versions = array(), $unsuppress = false ) {
|
|
$this->readOnlyError();
|
|
}
|
|
function delete( $reason, $suppress = false ) {
|
|
$this->readOnlyError();
|
|
}
|
|
function move( $target ) {
|
|
$this->readOnlyError();
|
|
}
|
|
}
|