summaryrefslogtreecommitdiff
path: root/includes/filerepo/ForeignDBFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/ForeignDBFile.php')
-rw-r--r--includes/filerepo/ForeignDBFile.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/includes/filerepo/ForeignDBFile.php b/includes/filerepo/ForeignDBFile.php
new file mode 100644
index 00000000..4d11640a
--- /dev/null
+++ b/includes/filerepo/ForeignDBFile.php
@@ -0,0 +1,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();
+ }
+}
+