Index: branches/5.0.x/core/units/general/custom_fields.php =================================================================== diff -u -r12117 -r12277 --- branches/5.0.x/core/units/general/custom_fields.php (.../custom_fields.php) (revision 12117) +++ branches/5.0.x/core/units/general/custom_fields.php (.../custom_fields.php) (revision 12277) @@ -1,6 +1,6 @@ ', '%3$s'), Array (TABLE_PREFIX, $this->Application->GetVar('m_lang')), $valueString) ); - preg_match_all("|\{(.*)\}|U", $string, $embedded_vars, PREG_SET_ORDER); - - /* - in ValueList now can use globally available variables. - Usage: {$_POST['variable']|what to output if $_POST['variable'] is set} - e.g. $_POST['variable']='Hello' - Will output: what to output if Hello is set - */ - - if ($embedded_vars) { - for ($i = 0; $i < count($embedded_vars); $i++) { - $embedded_var = $embedded_vars[$i][1]; - $embedded_var_src = $embedded_vars[$i][0]; - - list($var_name, $pattern) = explode('|', $embedded_var); - eval('$var_value = (isset('.$var_name.')?'.$var_name.':false);'); - - if ($var_value !== false) { - $pattern = str_replace($var_name, $var_value, $pattern); - $string = str_replace($embedded_var_src, $pattern, $string); - } - else { - $string = str_replace($embedded_var_src, '', $string); - } - } - } - if (preg_match_all('/(.*?)<\/SQL>/', $string, $regs)) { $i = 0; $sql_count = count($regs[0]);