X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FForeignDBRepo.php;h=283576a29eedcd31fc9c61d8bd66d801f8fe3a61;hb=09cc5e1e42ad827eef8f8db7b16fbaa7ca238a9f;hp=f3a560b4db2b231cb40ee68e15117c038c0df898;hpb=d9d5cbc8fce1b2a54a32d3c1df516366b8d68a98;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/ForeignDBRepo.php b/includes/filerepo/ForeignDBRepo.php index f3a560b4db..283576a29e 100644 --- a/includes/filerepo/ForeignDBRepo.php +++ b/includes/filerepo/ForeignDBRepo.php @@ -94,18 +94,19 @@ class ForeignDBRepo extends LocalRepo { * @return Closure */ protected function getDBFactory() { - return function( $index ) { - return DatabaseBase::factory( $this->dbType, - array( - 'host' => $this->dbServer, - 'user' => $this->dbUser, - 'password' => $this->dbPassword, - 'dbname' => $this->dbName, - 'flags' => $this->dbFlags, - 'tablePrefix' => $this->tablePrefix, - 'foreign' => true, - ) - ); + $type = $this->dbType; + $params = array( + 'host' => $this->dbServer, + 'user' => $this->dbUser, + 'password' => $this->dbPassword, + 'dbname' => $this->dbName, + 'flags' => $this->dbFlags, + 'tablePrefix' => $this->tablePrefix, + 'foreign' => true, + ); + + return function ( $index ) use ( $type, $params ) { + return DatabaseBase::factory( $type, $params ); }; }