Fixed an issue with searching the logs by model where incorrect model entries would also show up as options

pull/854/head
Iglocska 2016-01-13 08:36:14 +01:00
parent 953a83a9e0
commit 4b20cf8124
1 changed files with 2 additions and 8 deletions

View File

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