From 51ee20d4ba1a88ca910461cf0a0631e159f34518 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 29 May 2008 22:45:11 +0000 Subject: [PATCH] Hack around borkage with findFiles() on ForeignDBViaLBRepo by copying newFileFromRow() from ForeignDBRepo. 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/filerepo/ForeignDBViaLBRepo.php b/includes/filerepo/ForeignDBViaLBRepo.php index ee9d11673d..e464f080b5 100644 --- a/includes/filerepo/ForeignDBViaLBRepo.php +++ b/includes/filerepo/ForeignDBViaLBRepo.php @@ -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']; -- 2.20.1