mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix the UniqueCollection fetcher
This commit is contained in:
@@ -32,7 +32,16 @@ class RecordHelper
|
||||
|
||||
public function getUniqueCollectionId($databoxId, $collectionId)
|
||||
{
|
||||
return igorw\get_in($this->collectionMap(), [$databoxId, $collectionId]);
|
||||
$col = $this->collectionMap();
|
||||
|
||||
if (isset($col[$databoxId])) {
|
||||
$index = array_search($collectionId, $col[$databoxId]);
|
||||
if ($index !== false) {
|
||||
return (int) $index;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private function collectionMap()
|
||||
|
Reference in New Issue
Block a user