Merge pull request #21 from ballessay/fix-csv-import-spaces

Trim components of multiselect fields
This commit is contained in:
Nathan Gray 2017-10-13 08:40:36 -06:00 committed by GitHub
commit c228fa77f7

View File

@ -522,10 +522,10 @@ class importexport_import_csv implements importexport_iface_import_record { //,
$subs = explode(',',$record_value);
for($sub_index = 0; $sub_index < count($subs); $sub_index++)
{
$sub_key = static::find_select_key($subs[$sub_index], $selects);
$sub_key = static::find_select_key(trim($subs[$sub_index]), $selects);
if(!$sub_key)
{
$sub_key = static::find_select_key($subs[$sub_index].','.$subs[$sub_index+1], $selects);
$sub_key = static::find_select_key(trim($subs[$sub_index]).','.trim($subs[$sub_index+1]), $selects);
if($sub_key) $sub_index++;
}
if($sub_key)