Fix to the csv export in the automation not allowing a full export ignoring ids flags

pull/274/merge
iglocska 2014-03-24 15:30:49 +01:00
parent a9774076b1
commit 4865121b7b
1 changed files with 3 additions and 1 deletions

View File

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