X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FFileBackendDBRepoWrapper.php;h=5bc60a0e0af889aea4cdb4460733a35b63d2601e;hb=bf646045178630754463e9f9e2464bdab3468f90;hp=aec337e404a4f8c7c5cf0c7ad0b7e59a78625614;hpb=6e9b4f0e9ce4ccd6089c18b205065ef7fa077484;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/FileBackendDBRepoWrapper.php b/includes/filerepo/FileBackendDBRepoWrapper.php index aec337e404..5bc60a0e0a 100644 --- a/includes/filerepo/FileBackendDBRepoWrapper.php +++ b/includes/filerepo/FileBackendDBRepoWrapper.php @@ -27,7 +27,7 @@ * @brief Proxy backend that manages file layout rewriting for FileRepo. * * LocalRepo may be configured to store files under their title names or by SHA-1. - * This acts as a shim in the later case, providing backwards compatability for + * This acts as a shim in the latter case, providing backwards compatability for * most callers. All "public"/"deleted" zone files actually go in an "original" * container and are never changed. * @@ -50,8 +50,10 @@ class FileBackendDBRepoWrapper extends FileBackend { protected $dbs; public function __construct( array $config ) { - $config['name'] = $config['backend']->getName(); - $config['wikiId'] = $config['backend']->getWikiId(); + /** @var FileBackend $backend */ + $backend = $config['backend']; + $config['name'] = $backend->getName(); + $config['wikiId'] = $backend->getWikiId(); parent::__construct( $config ); $this->backend = $config['backend']; $this->repoName = $config['repoName']; @@ -94,7 +96,7 @@ class FileBackendDBRepoWrapper extends FileBackend { * @return array Translated paths in same order */ public function getBackendPaths( array $paths, $latest = true ) { - $db = $this->getDB( $latest ? DB_MASTER : DB_SLAVE ); + $db = $this->getDB( $latest ? DB_MASTER : DB_REPLICA ); // @TODO: batching $resolved = []; @@ -256,7 +258,7 @@ class FileBackendDBRepoWrapper extends FileBackend { return $this->translateSrcParams( __FUNCTION__, $params ); } - public function getScopedLocksForOps( array $ops, Status $status ) { + public function getScopedLocksForOps( array $ops, StatusValue $status ) { return $this->backend->getScopedLocksForOps( $ops, $status ); }