3 * Foreign file with an accessible MediaWiki database
6 * @ingroup FileAbstraction
10 * Foreign file with an accessible MediaWiki database
12 * @ingroup FileAbstraction
14 class ForeignDBFile
extends LocalFile
{
20 * @return ForeignDBFile
22 static function newFromTitle( $title, $repo, $unused = null ) {
23 return new self( $title, $repo );
27 * Create a ForeignDBFile from a title
28 * Do not call this except from inside a repo class.
33 * @return ForeignDBFile
35 static function newFromRow( $row, $repo ) {
36 $title = Title
::makeTitle( NS_FILE
, $row->img_name
);
37 $file = new self( $title, $repo );
38 $file->loadFromRow( $row );
42 function publish( $srcPath, $flags = 0 ) {
43 $this->readOnlyError();
46 function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
47 $watch = false, $timestamp = false ) {
48 $this->readOnlyError();
51 function restore( $versions = array(), $unsuppress = false ) {
52 $this->readOnlyError();
55 function delete( $reason, $suppress = false ) {
56 $this->readOnlyError();
59 function move( $target ) {
60 $this->readOnlyError();
66 function getDescriptionUrl() {
67 // Restore remote behaviour
68 return File
::getDescriptionUrl();
74 function getDescriptionText() {
75 // Restore remote behaviour
76 return File
::getDescriptionText();