forked from extern/egroupware
Keep previous CSV-only preview around too
This commit is contained in:
parent
2b96aff758
commit
f34afea1c7
@ -252,9 +252,13 @@
|
||||
*
|
||||
*/
|
||||
protected function preview(importexport_iface_import_plugin &$plugin, &$stream, importexport_definition &$definition_obj)
|
||||
{
|
||||
if(method_exists($plugin, 'preview'))
|
||||
{
|
||||
$preview = $plugin->preview($stream, $definition_obj);
|
||||
/*
|
||||
}
|
||||
elseif($definition_obj->plugin_options['csv_fields'])
|
||||
{
|
||||
$import_csv = new importexport_import_csv( $stream, array(
|
||||
'fieldsep' => $definition_obj->plugin_options['fieldsep'],
|
||||
'charset' => $definition_obj->plugin_options['charset'],
|
||||
@ -271,7 +275,8 @@
|
||||
if($import_csv->get_current_position() <= $definition_obj->plugin_options['num_header_lines']) $row--;
|
||||
}
|
||||
$preview = html::table($rows);
|
||||
*/
|
||||
rewind($stream);
|
||||
}
|
||||
return '<h2>' . lang('Preview') . ' - ' . $plugin->get_name() . '</h2>' . $preview;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user