From c83b1e2dd096e67a9f1dcbe8b4fd3a257bb7ac74 Mon Sep 17 00:00:00 2001 From: iglocska Date: Sun, 8 Nov 2015 22:56:00 +0100 Subject: [PATCH] Fix to the CSV export, fixes #710 --- app/Model/Event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Model/Event.php b/app/Model/Event.php index 9b7cf76d2..eb89cc22f 100755 --- a/app/Model/Event.php +++ b/app/Model/Event.php @@ -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') {