Index: branches/RC/core/units/general/custom_fields.php =================================================================== diff -u -N -r11178 -r11854 --- branches/RC/core/units/general/custom_fields.php (.../custom_fields.php) (revision 11178) +++ branches/RC/core/units/general/custom_fields.php (.../custom_fields.php) (revision 11854) @@ -12,12 +12,12 @@ * * @param string $values_list * @param string $separator - * @param bool $parse_sqls + * @param bool $parse * @return Array */ - function GetValuesHash($values_list, $separator = VALUE_LIST_SEPARATOR, $parse_sqls = true) + function GetValuesHash($values_list, $separator = VALUE_LIST_SEPARATOR, $parse = true) { - $values_list = trim($this->ParseConfigSQL($values_list, $separator, $parse_sqls), $separator); + $values_list = trim($this->ParseConfigSQL($values_list, $separator, $parse), $separator); if (!$values_list) { // no options, then return empty array @@ -36,15 +36,29 @@ return Array (); } - foreach ($optionValuesTmp as $optionValue) { - list ($key, $val) = explode('=', $optionValue); - $val = (substr($val,0,1) == '+') ? substr($val, 1) : $this->Application->Phrase($val); + if ($parse) { + // normal way + foreach ($optionValuesTmp as $optionValue) { + list ($key, $val) = explode('=', $optionValue); - if (substr($key, 0, 3) == 'SQL') { - $val = base64_decode( str_replace('_', '=', $val) ); + $val = substr($val, 0, 1) == '+' ? substr($val, 1) : $this->Application->Phrase($val); + + $optionValues[$key] = $val; } - $optionValues[$key] = $val; } + else { + // during custom field editing + foreach ($optionValuesTmp as $optionValue) { + list ($key, $val) = explode('=', $optionValue); + + if (substr($key, 0, 3) == 'SQL') { + $val = base64_decode( str_replace('_', '=', substr($val, 1)) ); + } + + $optionValues[$key] = $val; + } + } + return $optionValues; }