From e346a8cb0547cb76591672732453fecb858beb57 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 21 Dec 2021 08:30:37 +0100 Subject: [PATCH] fix: [instance:searchAll] Correct usage of parameters --- src/Model/Table/InstanceTable.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Table/InstanceTable.php b/src/Model/Table/InstanceTable.php index 562e642..8d3a86c 100644 --- a/src/Model/Table/InstanceTable.php +++ b/src/Model/Table/InstanceTable.php @@ -50,12 +50,13 @@ class InstanceTable extends AppTable $controller = $this->getController($tableName); $table = TableRegistry::get($tableName); $query = $table->find(); - $quickFilterOptions = $this->getQuickFiltersFieldsFromController($controller); + $quickFilters = $this->getQuickFiltersFieldsFromController($controller); $containFields = $this->getContainFieldsFromController($controller); - if (empty($quickFilterOptions)) { + if (empty($quickFilters)) { continue; // make sure we are filtering on something } $params = ['quickFilter' => $value]; + $quickFilterOptions = ['quickFilters' => $quickFilters]; $query = $controller->CRUD->setQuickFilters($params, $query, $quickFilterOptions); if (!empty($containFields)) { $query->contain($containFields);