From 31bae98d9f31720f4e323d680107bc7ee550dcc2 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 18 Apr 2012 17:48:08 +0000 Subject: [PATCH] - Export all records - Properly handle export result --- .../inc/class.importexport_schedule_ui.inc.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/importexport/inc/class.importexport_schedule_ui.inc.php b/importexport/inc/class.importexport_schedule_ui.inc.php index 3ccd3112b7..a1caf2766b 100644 --- a/importexport/inc/class.importexport_schedule_ui.inc.php +++ b/importexport/inc/class.importexport_schedule_ui.inc.php @@ -457,6 +457,13 @@ $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) { // Update lock timeout @@ -512,7 +519,11 @@ $data['result'][$target][] = lang($action) . ": $count"; } } 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()); + } } }