From 09baab1076e0d427c8575ec915458a41b599c540 Mon Sep 17 00:00:00 2001 From: bgenere Date: Sat, 3 Dec 2016 18:46:12 +0100 Subject: [PATCH] Fix display issue on step 4 of import in import.php. The issue was only for custom module import as the entity was initialised with the icone name i.e. filename@modulename. Then the arrays entitytoicon and entitytolang where used. But by definition custom modules do not have entries in these arrays. So changed the assignement to proper object property when $entity is not in these 2 tables. This is not changing behaviour of default object. I have tested both with my custom objet and product object. So it should be fine now. --- htdocs/imports/import.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 3b93c40e5ef..f86197b82a8 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -867,14 +867,14 @@ if ($step == 4 && $datatoimport) print ''; $i++; - - $entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_label[0]); + + $entity=(! empty($objimport->array_import_entities[0][$code])?$objimport->array_import_entities[0][$code]:$objimport->array_import_icon[0]); $tablealias=preg_replace('/(\..*)$/i','',$code); $tablename=$objimport->array_import_tables[0][$tablealias]; - $entityicon=$entitytoicon[$entity]?$entitytoicon[$entity]:$entity; - $entitylang=$entitytolang[$entity]?$entitytolang[$entity]:$entity; + $entityicon=$entitytoicon[$entity]?$entitytoicon[$entity]:$objimport->array_import_icon[0]; + $entitylang=$entitytolang[$entity]?$entitytolang[$entity]:$objimport->array_import_label[0]; - print ''.img_object('',$entityicon).' '.$langs->trans($entitylang).''; + print '=>'.img_object('',$entityicon).' '.$langs->trans($entitylang).''; print ''; $newlabel=preg_replace('/\*$/','',$label); $text=$langs->trans($newlabel);