mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 05:23:21 +00:00
change variable name
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -89,7 +89,7 @@ class BorderManagerServiceProvider implements ServiceProviderInterface
|
||||
}
|
||||
}
|
||||
|
||||
$checkerObj->setIgnoreCollections($collections);
|
||||
$checkerObj->setCompareIgnoreCollections($collections);
|
||||
}
|
||||
|
||||
$registeredCheckers[] = $checkerObj;
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user