Process the whole file when doing a preview, but only keep a few records for display

This commit is contained in:
Nathan Gray 2012-10-17 14:49:18 +00:00
parent 7c9f8e18a5
commit 5132b8e3ca

View File

@ -160,11 +160,10 @@ abstract class importexport_basic_import_csv implements importexport_iface_impor
if($success) $count++; if($success) $count++;
// Stop if we have enough records for a preview // Keep a few records for preview, but process the whole file
if($this->dry_run) if($this->dry_run && $import_csv->get_current_position() < $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'])
{ {
$this->preview_records[] = $egw_record; $this->preview_records[] = $egw_record;
if($import_csv->get_current_position() >= $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']) break;
} }
} }
return $count; return $count;