Skip to content
Snippets Groups Projects
Commit 3ae18ae2 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #8956 getfilters

parent a167c869
No related branches found
No related tags found
No related merge requests found
...@@ -237,9 +237,9 @@ class ResourceListController ...@@ -237,9 +237,9 @@ class ResourceListController
if (empty($data['categories'])) { if (empty($data['categories'])) {
$tmpWhere = 'category_id is null'; $tmpWhere = 'category_id is null';
} else { } else {
$replace = preg_replace('/(^,)|(,$)/', '', $data['category_id']); $replace = preg_replace('/(^,)|(,$)/', '', $data['categories']);
$replace = preg_replace('/(,,)/', ',', $replace); $replace = preg_replace('/(,,)/', ',', $replace);
if ($replace != $data['category_id']) { if ($replace != $data['categories']) {
$tmpWhere = '(category_id is null OR category_id in (?))'; $tmpWhere = '(category_id is null OR category_id in (?))';
} else { } else {
$tmpWhere = 'category_id in (?)'; $tmpWhere = 'category_id in (?)';
...@@ -290,11 +290,11 @@ class ResourceListController ...@@ -290,11 +290,11 @@ class ResourceListController
} }
if (!empty($entitiesChildren)) { if (!empty($entitiesChildren)) {
$wherePriorities[] = 'destination in (?)'; $wherePriorities[] = 'destination in (?)';
$dataPriorities[] = explode(',', $data['entities']); $dataPriorities[] = $entitiesChildren;
$whereCategories[] = 'destination in (?)'; $whereCategories[] = 'destination in (?)';
$dataCategories[] = explode(',', $data['entities']); $dataCategories[] = $entitiesChildren;
$whereStatuses[] = 'destination in (?)'; $whereStatuses[] = 'destination in (?)';
$dataStatuses[] = explode(',', $data['entities']); $dataStatuses[] = $entitiesChildren;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment