From e9056a7b4ce5c54cab112b8bd5bf274b56e522bf Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 23 Feb 2023 12:56:10 +0100 Subject: [PATCH] chg: [audit:filter] Made request_action a multiple search --- src/Controller/AuditLogsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/AuditLogsController.php b/src/Controller/AuditLogsController.php index e3e4e0c..8836d49 100644 --- a/src/Controller/AuditLogsController.php +++ b/src/Controller/AuditLogsController.php @@ -11,7 +11,7 @@ use Cake\Core\Configure; class AuditLogsController extends AppController { - public $filterFields = ['model_id', 'model', 'request_action', 'user_id', 'model_title', 'AuditLogs.created']; + public $filterFields = ['model_id', 'model', ['name' => 'request_action', 'multiple' => true, ], 'user_id', 'model_title', 'AuditLogs.created']; public $quickFilterFields = ['model', 'request_action', 'model_title']; public $containFields = ['Users']; @@ -20,7 +20,7 @@ class AuditLogsController extends AppController $this->CRUD->index([ 'contain' => $this->containFields, 'order' => ['AuditLogs.id' => 'DESC'], - 'filters' => $this->filterFields, + 'filters' => $this->CRUD->getFilterFieldsName($this->filterFields), 'quickFilters' => $this->quickFilterFields, 'afterFind' => function($data) { $request_ip = is_resource($data['request_ip']) ? stream_get_contents($data['request_ip']) : $data['request_ip'];