summaryrefslogtreecommitdiff
path: root/includes/filerepo/file/ForeignDBFile.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/filerepo/file/ForeignDBFile.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/filerepo/file/ForeignDBFile.php')
-rw-r--r--includes/filerepo/file/ForeignDBFile.php78
1 files changed, 78 insertions, 0 deletions
diff --git a/includes/filerepo/file/ForeignDBFile.php b/includes/filerepo/file/ForeignDBFile.php
new file mode 100644
index 00000000..191a712d
--- /dev/null
+++ b/includes/filerepo/file/ForeignDBFile.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Foreign file with an accessible MediaWiki database
+ *
+ * @file
+ * @ingroup FileAbstraction
+ */
+
+/**
+ * Foreign file with an accessible MediaWiki database
+ *
+ * @ingroup FileAbstraction
+ */
+class ForeignDBFile extends LocalFile {
+
+ /**
+ * @param $title
+ * @param $repo
+ * @param $unused
+ * @return ForeignDBFile
+ */
+ 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.
+ *
+ * @param $row
+ * @param $repo
+ *
+ * @return ForeignDBFile
+ */
+ 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();
+ }
+
+ /**
+ * @return string
+ */
+ function getDescriptionUrl() {
+ // Restore remote behaviour
+ return File::getDescriptionUrl();
+ }
+
+ /**
+ * @return string
+ */
+ function getDescriptionText() {
+ // Restore remote behaviour
+ return File::getDescriptionText();
+ }
+}