- Export all records

- Properly handle export result
This commit is contained in:
Nathan Gray 2012-04-18 17:48:08 +00:00
parent 5b8b8fd838
commit 31bae98d9f

View File

@ -457,6 +457,13 @@
$targets = array($data['target']); $targets = array($data['target']);
} }
if($type == 'export')
{
// Set to export all
$definition->plugin_options = array_merge($definition->plugin_options, array('selection' => 'all'));
}
foreach($targets as $target) foreach($targets as $target)
{ {
// Update lock timeout // Update lock timeout
@ -512,7 +519,11 @@
$data['result'][$target][] = lang($action) . ": $count"; $data['result'][$target][] = lang($action) . ": $count";
} }
} else { } else {
$data['result'][$target] = $result; if($result instanceof importexport_iface_export_record)
{
$data['record_count'] += $result->get_num_of_records();
$data['result'][$target][] = lang('%1 records processed', $result->get_num_of_records());
}
} }
} }