mirror of https://github.com/MISP/MISP
Fix to the csv export's issue with exporting all events ignoring the ids flag
parent
a9774076b1
commit
f9ae41525f
|
@ -136,11 +136,13 @@ class EventShell extends AppShell
|
|||
$id = $this->args[2];
|
||||
$this->Job->id = $id;
|
||||
$extra = $this->args[3];
|
||||
if ($extra == 'csv_all') $ignore = 1;
|
||||
else $ignore = 0;
|
||||
$eventIds = $this->Event->fetchEventIds($org, $isSiteAdmin);
|
||||
$eventCount = count($eventIds);
|
||||
$attributes[] = array();
|
||||
foreach ($eventIds as $k => $eventId) {
|
||||
$attributes = array_merge($this->Event->csv($org, $isSiteAdmin, $eventId['Event']['id'], $extra), $attributes);
|
||||
$attributes = array_merge($this->Event->csv($org, $isSiteAdmin, $eventId['Event']['id'], $ignore), $attributes);
|
||||
if ($k % 10 == 0) {
|
||||
$this->Job->saveField('progress', $k / $eventCount * 80);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue