X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=blobdiff_plain;f=includes%2Ffilerepo%2Fbackend%2FFileBackendMultiWrite.php;h=efc6053f402c945c6c25e34852666c7122933dcd;hb=b47a2148c68b7bc58b12ec77fa3fe159f834e4e7;hp=59406d6377d979068064b3f251edbc0ac29c911f;hpb=af16ce7257634e9d5bef5266f8e3c4d84b93d9d2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/backend/FileBackendMultiWrite.php b/includes/filerepo/backend/FileBackendMultiWrite.php index 59406d6377..efc6053f40 100644 --- a/includes/filerepo/backend/FileBackendMultiWrite.php +++ b/includes/filerepo/backend/FileBackendMultiWrite.php @@ -506,4 +506,20 @@ class FileBackendMultiWrite extends FileBackend { $backend->clearCache( $realPaths ); } } + + /** + * @see FileBackend::getScopedLocksForOps() + */ + public function getScopedLocksForOps( array $ops, Status $status ) { + $fileOps = $this->backends[$this->masterIndex]->getOperationsInternal( $ops ); + // Get the paths to lock from the master backend + $paths = $this->backends[$this->masterIndex]->getPathsToLockForOpsInternal( $fileOps ); + // Get the paths under the proxy backend's name + $paths['sh'] = $this->unsubstPaths( $paths['sh'] ); + $paths['ex'] = $this->unsubstPaths( $paths['ex'] ); + return array( + $this->getScopedFileLocks( $paths['sh'], LockManager::LOCK_UW, $status ), + $this->getScopedFileLocks( $paths['ex'], LockManager::LOCK_EX, $status ) + ); + } }