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[]
|
* @var \collection[]
|
||||||
*/
|
*/
|
||||||
protected $ignoreCollections = [];
|
protected $compareIgnoreCollections = [];
|
||||||
|
|
||||||
public function __construct(Application $app)
|
public function __construct(Application $app)
|
||||||
{
|
{
|
||||||
@@ -100,9 +100,9 @@ abstract class AbstractChecker implements CheckerInterface
|
|||||||
return $this->collections;
|
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)
|
public function check(EntityManager $em, File $file)
|
||||||
{
|
{
|
||||||
$excludedCollIds = [];
|
$excludedCollIds = [];
|
||||||
if (!empty($this->ignoreCollections)) {
|
if (!empty($this->compareIgnoreCollections)) {
|
||||||
foreach ($this->ignoreCollections as $collection) {
|
foreach ($this->compareIgnoreCollections as $collection) {
|
||||||
// use only collection in the same databox and retrieve the coll_id
|
// use only collection in the same databox and retrieve the coll_id
|
||||||
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
||||||
$excludedCollIds[] = $collection->get_coll_id();
|
$excludedCollIds[] = $collection->get_coll_id();
|
||||||
|
@@ -35,8 +35,8 @@ class Sha256 extends AbstractChecker
|
|||||||
public function check(EntityManager $em, File $file)
|
public function check(EntityManager $em, File $file)
|
||||||
{
|
{
|
||||||
$excludedCollIds = [];
|
$excludedCollIds = [];
|
||||||
if (!empty($this->ignoreCollections)) {
|
if (!empty($this->compareIgnoreCollections)) {
|
||||||
foreach ($this->ignoreCollections as $collection) {
|
foreach ($this->compareIgnoreCollections as $collection) {
|
||||||
// use only collection in the same databox and retrieve the coll_id
|
// use only collection in the same databox and retrieve the coll_id
|
||||||
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
||||||
$excludedCollIds[] = $collection->get_coll_id();
|
$excludedCollIds[] = $collection->get_coll_id();
|
||||||
|
@@ -34,8 +34,8 @@ class UUID extends AbstractChecker
|
|||||||
public function check(EntityManager $em, File $file)
|
public function check(EntityManager $em, File $file)
|
||||||
{
|
{
|
||||||
$excludedCollIds = [];
|
$excludedCollIds = [];
|
||||||
if (!empty($this->ignoreCollections)) {
|
if (!empty($this->compareIgnoreCollections)) {
|
||||||
foreach ($this->ignoreCollections as $collection) {
|
foreach ($this->compareIgnoreCollections as $collection) {
|
||||||
// use only collection in the same databox and retrieve the coll_id
|
// use only collection in the same databox and retrieve the coll_id
|
||||||
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
if ($collection->get_sbas_id() === $file->getCollection()->get_sbas_id()) {
|
||||||
$excludedCollIds[] = $collection->get_coll_id();
|
$excludedCollIds[] = $collection->get_coll_id();
|
||||||
|
@@ -89,7 +89,7 @@ class BorderManagerServiceProvider implements ServiceProviderInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$checkerObj->setIgnoreCollections($collections);
|
$checkerObj->setCompareIgnoreCollections($collections);
|
||||||
}
|
}
|
||||||
|
|
||||||
$registeredCheckers[] = $checkerObj;
|
$registeredCheckers[] = $checkerObj;
|
||||||
|
@@ -138,7 +138,8 @@ class LegacyRecordRepository implements RecordRepository
|
|||||||
|
|
||||||
if (!$sql) {
|
if (!$sql) {
|
||||||
$qb = $this->createSelectBuilder()
|
$qb = $this->createSelectBuilder()
|
||||||
->where('uuid = :uuid');
|
->where('uuid = :uuid')
|
||||||
|
;
|
||||||
|
|
||||||
if (!empty($excludedCollIds)) {
|
if (!empty($excludedCollIds)) {
|
||||||
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));
|
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));
|
||||||
@@ -149,8 +150,8 @@ class LegacyRecordRepository implements RecordRepository
|
|||||||
|
|
||||||
$result = $this->databox->get_connection()->fetchAll($sql,
|
$result = $this->databox->get_connection()->fetchAll($sql,
|
||||||
[
|
[
|
||||||
'uuid' => $uuid,
|
'uuid' => $uuid,
|
||||||
'coll_id' => $excludedCollIds
|
'coll_id' => $excludedCollIds
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
':coll_id' => Connection::PARAM_INT_ARRAY
|
':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'));
|
$qb->andWhere($qb->expr()->notIn('coll_id', ':coll_id'));
|
||||||
|
|
||||||
$params['coll_id'] = $excludedCollIds;
|
$params['coll_id'] = $excludedCollIds;
|
||||||
$types[':coll_id'] = Connection::PARAM_INT_ARRAY;
|
$types[':coll_id'] = Connection::PARAM_INT_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = $qb->setFirstResult($offset_start)
|
$sql = $qb->setFirstResult($offset_start)
|
||||||
|
Reference in New Issue
Block a user