diff --git a/core/src/Revolution/Processors/Element/GetList.php b/core/src/Revolution/Processors/Element/GetList.php index 164875202c..42356dfbc7 100644 --- a/core/src/Revolution/Processors/Element/GetList.php +++ b/core/src/Revolution/Processors/Element/GetList.php @@ -37,13 +37,22 @@ public function prepareQueryAfterCount(xPDOQuery $c) $c->select([ 'category_name' => 'Category.category', ]); + $id = $this->getProperty('id', ''); + $categoryId = $this->getProperty('categoryId',''); + if (!empty($id)) { $c->where([ $c->getAlias() . '.id:IN' => is_string($id) ? explode(',', $id) : $id, ]); } + if (!empty($categoryId)) { + $c->where([ + 'Category.id:IN' => is_string($categoryId) ? explode(',', $categoryId) : $categoryId, + ]); + } + return $c; } }