Hack around borkage with findFiles() on ForeignDBViaLBRepo by copying newFileFromRow...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 29 May 2008 22:45:11 +0000 (22:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 29 May 2008 22:45:11 +0000 (22:45 +0000)
Probably this is all wrong, and both classes should be ripped out a bit and told to use the defined factory functions?

includes/filerepo/ForeignDBViaLBRepo.php

index ee9d116..e464f08 100644 (file)
@@ -8,6 +8,12 @@ class ForeignDBViaLBRepo extends LocalRepo {
        var $wiki, $dbName, $tablePrefix;
        var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' );
 
+       function newFileFromRow( $row ) {
+               if ( isset( $row->img_name ) )
+                       return ForeignDBFile::newFromRow( $row, $this );
+               return parent::newFileFromRow( $row );
+       }
+
        function __construct( $info ) {
                parent::__construct( $info );
                $this->wiki = $info['wiki'];