InstantCommons path and url cleanup
[lhc/web/wiklou.git] / includes / filerepo / ForeignDBFile.php
index eed2604..34a11cc 100644 (file)
@@ -1,6 +1,14 @@
 <?php
+/**
+ * Foreign file with an accessible MediaWiki database
+ *
+ * @file
+ * @ingroup FileRepo
+ */
 
 /**
+ * Foreign file with an accessible MediaWiki database
+ *
  * @ingroup FileRepo
  */
 class ForeignDBFile extends LocalFile {
@@ -13,22 +21,12 @@ class ForeignDBFile extends LocalFile {
         * Do not call this except from inside a repo class.
         */
        static function newFromRow( $row, $repo ) {
-               $title = Title::makeTitle( NS_IMAGE, $row->img_name );
+               $title = Title::makeTitle( NS_FILE, $row->img_name );
                $file = new self( $title, $repo );
                $file->loadFromRow( $row );
                return $file;
        }
 
-       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( $srcPath, $flags = 0 ) {
                $this->readOnlyError();
        }
@@ -46,14 +44,4 @@ class ForeignDBFile extends LocalFile {
        function move( $target ) {
                $this->readOnlyError();
        }
-       
-       function getDescriptionUrl() {
-               // Restore remote behaviour
-               return File::getDescriptionUrl();
-       }
-
-       function getDescriptionText() {
-               // Restore remote behaviour
-               return File::getDescriptionText();
-       }
 }