Fix to the CSV export, fixes #710

pull/727/head
iglocska 2015-11-08 22:56:00 +01:00
parent 16e7974fc0
commit c83b1e2dd0
1 changed files with 2 additions and 2 deletions

View File

@ -1028,7 +1028,7 @@ class Event extends AppModel {
}
private function attachEventInfoToAttributes($attributes, $isSiteAdmin) {
$TLs = $this->ThreatLevel->find('all', array(
$TLs = $this->ThreatLevel->find('list', array(
'recursive' => -1,
));
$event_ids = array();
@ -1059,7 +1059,7 @@ class Event extends AppModel {
foreach ($attributes as &$attribute) {
foreach ($context_fields as $field => $header_name) {
if ($header_name == 'event_threat_level_id') {
$attribute['Attribute'][$header_name] = $TLs[$event_id_data[$attribute['Attribute']['event_id']][$header_name]]['ThreatLevel']['name'];
$attribute['Attribute'][$header_name] = $TLs[$event_id_data[$attribute['Attribute']['event_id']][$header_name]];
} else if ($header_name == 'event_distribution') {
$attribute['Attribute'][$header_name] = $this->distributionLevels[$event_id_data[$attribute['Attribute']['event_id']][$header_name]];
} else if ($header_name == 'event_analysis') {