882b276f7a4020257c0ac32bf2af005171266841
3 class ForeignDBFile
extends LocalFile
{
4 static function newFromTitle( $title, $repo, $unused = null ) {
5 return new self( $title, $repo );
9 * Create a ForeignDBFile from a title
10 * Do not call this except from inside a repo class.
12 static function newFromRow( $row, $repo ) {
13 $title = Title
::makeTitle( NS_IMAGE
, $row->img_name
);
14 $file = new self( $title, $repo );
15 $file->loadFromRow( $row );
19 function getCacheKey() {
20 if ( $this->repo
->hasSharedCache
) {
21 $hashedName = md5($this->name
);
22 return wfForeignMemcKey( $this->repo
->dbName
, $this->repo
->tablePrefix
,
23 'file', $hashedName );
29 function publish( $srcPath, $flags = 0 ) {
30 $this->readOnlyError();
33 function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '',
34 $watch = false, $timestamp = false ) {
35 $this->readOnlyError();
37 function restore( $versions = array(), $unsuppress = false ) {
38 $this->readOnlyError();
40 function delete( $reason, $suppress = false ) {
41 $this->readOnlyError();
43 function move( $target ) {
44 $this->readOnlyError();
47 function getDescriptionUrl() {
48 // Restore remote behaviour
49 return File
::getDescriptionUrl();
52 function getDescriptionText() {
53 // Restore remote behaviour
54 return File
::getDescriptionText();