summaryrefslogtreecommitdiff
path: root/includes/filerepo/ForeignDBFile.php
blob: 4d11640a0c6eb042594de87ad65289a5d847e307 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

class ForeignDBFile extends LocalFile {
	static function newFromTitle( $title, $repo ) {
		return new self( $title, $repo );
	}

	function getCacheKey() {
		if ( $this->repo->hasSharedCache ) {
			$hashedName = md5($this->name);
			return wfForeignMemcKey( $this->repo->dbName, $this->repo->tablePrefix, 
				'file', $hashedName );
		} else {
			return false;
		}
	}

	function publish( /*...*/ ) {
		$this->readOnlyError();
	}

	function recordUpload( /*...*/ ) {
		$this->readOnlyError();
	}
	function restore(  /*...*/  ) {
		$this->readOnlyError();
	}
	function delete( /*...*/ ) {
		$this->readOnlyError();
	}

	function getDescriptionUrl() {
		// Restore remote behaviour
		return File::getDescriptionUrl();
	}

	function getDescriptionText() {
		// Restore remote behaviour
		return File::getDescriptionText();
	}
}