fix: [instance:searchAll] Correct usage of parameters

pull/93/head
Sami Mokaddem 2021-12-21 08:30:37 +01:00
parent a1a9029053
commit e346a8cb05
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 2 deletions

View File

@ -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);