Merge "[FileBackend] Added getScopedLocksForOps() function."
[lhc/web/wiklou.git] / includes / filerepo / backend / FileBackendStore.php
index aad4bf7..f02724f 100644 (file)
@@ -894,6 +894,18 @@ abstract class FileBackendStore extends FileBackend {
                return $paths;
        }
 
+       /**
+        * @see FileBackend::getScopedLocksForOps()
+        * @return Array
+        */
+       public function getScopedLocksForOps( array $ops, Status $status ) {
+               $paths = $this->getPathsToLockForOpsInternal( $this->getOperationsInternal( $ops ) );
+               return array(
+                       $this->getScopedFileLocks( $paths['sh'], LockManager::LOCK_UW, $status ),
+                       $this->getScopedFileLocks( $paths['ex'], LockManager::LOCK_EX, $status )
+               );
+       }
+
        /**
         * @see FileBackend::doOperationsInternal()
         * @return Status