Index: trunk/kernel/parser.php =================================================================== diff -u -r6428 -r7391 --- trunk/kernel/parser.php (.../parser.php) (revision 6428) +++ trunk/kernel/parser.php (.../parser.php) (revision 7391) @@ -542,9 +542,8 @@ } else { - $value = inp_htmlize($FormValues[$form][$field], 1); - if (is_array($value)) - { + $value = $FormValues[$form][$field]; + if (is_array($value)) { $value = is_null($value['lang_value'])? $value['value'] : $value['lang_value']; } $value = inp_htmlize($value, 1); @@ -614,6 +613,11 @@ $sql = 'SELECT ValueList FROM '.GetTablePrefix().'CustomField WHERE FieldName = %s AND Type = %s'; $values = $application->Conn->GetOne( sprintf($sql, $application->DB->qstr($field), $item_type ) ); + + // 2. replace any sqls found there + $objConfigDummy = new clsConfigAdminItem(); + $values = $objConfigDummy->replace_sql($values); + if(!$values) return ''; if( GetVar($field) ) @@ -960,9 +964,10 @@ if( getArrayValue($attribs, '_confirmtemplate') ) { $url_params['Confirm'] = $attribs['_confirmtemplate']; - $url_params['DestTemplate'] = $var_list['t']; + $url_params['DestTemplate'] = $_REQUEST['DestTemplate'] ? $_REQUEST['DestTemplate'] : $var_list['t']; } if( getArrayValue($attribs, '_errortemplate') ) $url_params['Error'] = $attribs['_errortemplate']; + if( getArrayValue($attribs, '_captchatemplate') ) $url_params['Captcha'] = $attribs['_captchatemplate']; } break; @@ -973,7 +978,7 @@ } else { - $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : 'index'; + $var_list_update['t'] = getArrayValue($_GET, 'DestTemplate') ? $_GET['DestTemplate'] : 'index'; } break; @@ -3586,8 +3591,10 @@ */ function m_sitemap($attribs = array()) { - global $objModules, $objConfig, $objCatList; + global $objModules, $objConfig, $objCatList, $m_var_list; + $backup_m_var_list = $m_var_list; + $html_attribs = ExtraAttributes($attribs); $mod_name = getArrayValue($attribs, "_modulename"); @@ -3756,6 +3763,8 @@ $ret.= "\n\n"; } + $m_var_list = $backup_m_var_list; + return $ret; }