Importexport - handle select values that are label,value pairs as well as name => value

This commit is contained in:
nathangray 2019-03-06 14:31:06 -07:00
parent 3e03f77339
commit 0c9904a21a

View File

@ -322,7 +322,8 @@ class importexport_export_csv implements importexport_iface_export_record
if(is_array($record->$name)) {
$names = array();
foreach($record->$name as $_name) {
$names[] = lang($selects[$name][$_name]);
$option = $selects[$name][$_name];
$names[] = lang(is_array($option) && $option['label'] ? $option['label'] : $option);
}
$record->$name = implode(', ', $names);
} else {