From 4b20cf8124495e22cb93919f5779d4ce12d3255f Mon Sep 17 00:00:00 2001 From: Iglocska Date: Wed, 13 Jan 2016 08:36:14 +0100 Subject: [PATCH] Fixed an issue with searching the logs by model where incorrect model entries would also show up as options --- app/Controller/LogsController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Controller/LogsController.php b/app/Controller/LogsController.php index ee69aa68f..22372bab2 100755 --- a/app/Controller/LogsController.php +++ b/app/Controller/LogsController.php @@ -242,15 +242,9 @@ class LogsController extends AppController { $actions = array('' => array('ALL' => 'ALL'), 'actions' => array()); $actions['actions'] = array_merge($actions['actions'], $this->_arrayToValuesIndexArray($this->{$this->defaultModel}->validate['action']['rule'][1])); $this->set('actions', $actions); - - $models = $this->Log->find('list', array( - 'fields' => array('Log.model'), - 'group' => array('Log.model') - )); - $models = $this->_arrayToValuesIndexArray($models); - $models[''] = 'ALL'; + $models = array('Attribute', 'Event', 'EventBlacklist', 'EventTag', 'Organisation', 'Post', 'Regexp', 'Role', 'Server', 'ShadowAttribute', 'SharingGroup', 'Tag', 'Task', 'Taxonomy', 'Template', 'Thread', 'User', 'Whitelist'); + $models = array('' => 'ALL') + $this->_arrayToValuesIndexArray($models); $this->set('models', $models); - $this->set('actionDefinitions', $this->{$this->defaultModel}->actionDefinitions); } }