diff --git a/lib/Alchemy/Phrasea/Border/Checker/AbstractChecker.php b/lib/Alchemy/Phrasea/Border/Checker/AbstractChecker.php index c929cf13bf..de6f4c25d6 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/AbstractChecker.php +++ b/lib/Alchemy/Phrasea/Border/Checker/AbstractChecker.php @@ -37,7 +37,7 @@ abstract class AbstractChecker implements CheckerInterface /** * @var \collection[] */ - protected $ignoreCollections = []; + protected $compareIgnoreCollections = []; public function __construct(Application $app) { @@ -100,9 +100,9 @@ abstract class AbstractChecker implements CheckerInterface return $this->collections; } - public function setIgnoreCollections($collections) + public function setCompareIgnoreCollections($collections) { - $this->ignoreCollections = $collections; + $this->compareIgnoreCollections = $collections; } /** diff --git a/lib/Alchemy/Phrasea/Border/Checker/Filename.php b/lib/Alchemy/Phrasea/Border/Checker/Filename.php index 0aa5661f95..ea1c25a7a6 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/Filename.php +++ b/lib/Alchemy/Phrasea/Border/Checker/Filename.php @@ -46,8 +46,8 @@ class Filename extends AbstractChecker public function check(EntityManager $em, File $file) { $excludedCollIds = []; - if (!empty($this->ignoreCollections)) { - foreach ($this->ignoreCollections as $collection) { + if (!empty($this->compareIgnoreCollections)) { + foreach ($this->compareIgnoreCollections as $collection) { // use only collection in the same databox and retrieve the coll_id if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) { $excludedCollIds[] = $collection->get_coll_id(); diff --git a/lib/Alchemy/Phrasea/Border/Checker/Sha256.php b/lib/Alchemy/Phrasea/Border/Checker/Sha256.php index 7f994a55c2..5116e35dfd 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/Sha256.php +++ b/lib/Alchemy/Phrasea/Border/Checker/Sha256.php @@ -35,8 +35,8 @@ class Sha256 extends AbstractChecker public function check(EntityManager $em, File $file) { $excludedCollIds = []; - if (!empty($this->ignoreCollections)) { - foreach ($this->ignoreCollections as $collection) { + if (!empty($this->compareIgnoreCollections)) { + foreach ($this->compareIgnoreCollections as $collection) { // use only collection in the same databox and retrieve the coll_id if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) { $excludedCollIds[] = $collection->get_coll_id(); diff --git a/lib/Alchemy/Phrasea/Border/Checker/UUID.php b/lib/Alchemy/Phrasea/Border/Checker/UUID.php index 86960a045b..cdacf973a5 100644 --- a/lib/Alchemy/Phrasea/Border/Checker/UUID.php +++ b/lib/Alchemy/Phrasea/Border/Checker/UUID.php @@ -34,8 +34,8 @@ class UUID extends AbstractChecker public function check(EntityManager $em, File $file) { $excludedCollIds = []; - if (!empty($this->ignoreCollections)) { - foreach ($this->ignoreCollections as $collection) { + if (!empty($this->compareIgnoreCollections)) { + foreach ($this->compareIgnoreCollections as $collection) { // use only collection in the same databox and retrieve the coll_id if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) { $excludedCollIds[] = $collection->get_coll_id(); diff --git a/lib/Alchemy/Phrasea/Core/Provider/BorderManagerServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/BorderManagerServiceProvider.php index ff6d083077..d7a0f636f9 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/BorderManagerServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/BorderManagerServiceProvider.php @@ -89,7 +89,7 @@ class BorderManagerServiceProvider implements ServiceProviderInterface } } - $checkerObj->setIgnoreCollections($collections); + $checkerObj->setCompareIgnoreCollections($collections); } $registeredCheckers[] = $checkerObj; diff --git a/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php b/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php index 0e2cd7adea..2d3c4564e4 100644 --- a/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php @@ -138,7 +138,8 @@ class LegacyRecordRepository implements RecordRepository if (!$sql) { $qb = $this->createSelectBuilder() - ->where('uuid = :uuid'); + ->where('uuid = :uuid') + ; if (!empty($excludedCollIds)) { $qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id')); @@ -149,8 +150,8 @@ class LegacyRecordRepository implements RecordRepository $result = $this->databox->get_connection()->fetchAll($sql, [ - 'uuid' => $uuid, - 'coll_id' => $excludedCollIds + 'uuid' => $uuid, + 'coll_id' => $excludedCollIds ], [ ':coll_id' => Connection::PARAM_INT_ARRAY diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index ec7d997f1e..e544dae308 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -1692,7 +1692,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id')); $params['coll_id'] = $excludedCollIds; - $types[':coll_id'] = Connection::PARAM_INT_ARRAY; + $types[':coll_id'] = Connection::PARAM_INT_ARRAY; } $sql = $qb->setFirstResult($offset_start)