Slight fix for r47781: remove useless if($index) conditional: $index is always set...
[lhc/web/wiklou.git] / includes / filerepo / ForeignDBFile.php
index 882b276..8fe6f92 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @ingroup FileRepo
+ */
 class ForeignDBFile extends LocalFile {
        static function newFromTitle( $title, $repo, $unused = null ) {
                return new self( $title, $repo );
@@ -10,14 +13,14 @@ 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 ) {
+               if ( $this->repo->hasSharedCache() ) {
                        $hashedName = md5($this->name);
                        return wfForeignMemcKey( $this->repo->dbName, $this->repo->tablePrefix,
                                'file', $hashedName );