From 8daab707256b0642b8ef099b722d7602aa302829 Mon Sep 17 00:00:00 2001 From: jekkos Date: Sun, 30 Jun 2019 22:03:02 +0200 Subject: [PATCH] Fix text attribute parsing (#2476) --- application/helpers/tabular_helper.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/helpers/tabular_helper.php b/application/helpers/tabular_helper.php index 5d5055579..723b1d2e5 100644 --- a/application/helpers/tabular_helper.php +++ b/application/helpers/tabular_helper.php @@ -533,18 +533,18 @@ function get_item_kit_data_row($item_kit) ); } -function concat_attribute_value($columns, $row) { - $attribute_values = ''; +function parse_attribute_values($columns, $row) { + $attribute_values = array(); foreach($columns as $column) { - $attribute_values .= (isset($row[$column])) ? $row[$column] : ''; + $attribute_value = explode('|', $row[$column]); + $attribute_values = array_merge($attribute_values, $attribute_value); } - - return explode('|', $attribute_values); + return $attribute_values; } function expand_attribute_values($definition_names, $row) { - $values = concat_attribute_value(array('attribute_values', 'attribute_dtvalues', 'attribute_dvalues'), $row); + $values = parse_attribute_values(array('attribute_values', 'attribute_dtvalues', 'attribute_dvalues'), $row); $indexed_values = array(); foreach($values as $attribute_value)