mirror of https://github.com/MISP/MISP
Fix to the csv export in the automation not allowing a full export ignoring ids flags
parent
a9774076b1
commit
4865121b7b
|
@ -136,11 +136,13 @@ class EventShell extends AppShell
|
||||||
$id = $this->args[2];
|
$id = $this->args[2];
|
||||||
$this->Job->id = $id;
|
$this->Job->id = $id;
|
||||||
$extra = $this->args[3];
|
$extra = $this->args[3];
|
||||||
|
if ($extra == 'csv_all') $ignore = 1;
|
||||||
|
else $ignore = 0;
|
||||||
$eventIds = $this->Event->fetchEventIds($org, $isSiteAdmin);
|
$eventIds = $this->Event->fetchEventIds($org, $isSiteAdmin);
|
||||||
$eventCount = count($eventIds);
|
$eventCount = count($eventIds);
|
||||||
$attributes[] = array();
|
$attributes[] = array();
|
||||||
foreach ($eventIds as $k => $eventId) {
|
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) {
|
if ($k % 10 == 0) {
|
||||||
$this->Job->saveField('progress', $k / $eventCount * 80);
|
$this->Job->saveField('progress', $k / $eventCount * 80);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue