From 301ec56f95d65f87026f3af4eeb42afca2c1e8bb Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sat, 17 Dec 2011 12:22:18 +0000 Subject: [PATCH] Ersatz-Schema fuer Template-Variable bei indiv. Formular-Feldern funktioniert nun auch bei den Fehlermeldungen (siehe Revision 25). --- form-email/functions.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/form-email/functions.php b/form-email/functions.php index e746a7e..9e68c64 100644 --- a/form-email/functions.php +++ b/form-email/functions.php @@ -7,7 +7,7 @@ # geschrieben wurde. # # Autor: Patrick Canterino -# Letzte Aenderung: 12.12.2011 +# Letzte Aenderung: 17.12.2011 # # Copyright (C) 2002-2011 Patrick Canterino # @@ -147,7 +147,14 @@ function show_user_error($errmsg) { reset($user_fields); while(list($user_field,$user_field_data) = each($user_fields)) { - $tpl->set_var($user_field_data['tpl_var'],htmlspecialchars(formdata($user_field))); + if(isset($user_field_data['tpl_var']) && $user_field_data['tpl_var'] != '') { + $tpl_var = $user_field_data['tpl_var']; + } + else { + $tpl_var = 'USER_'.$user_field; + } + + $tpl->set_var($tpl_var,htmlspecialchars(formdata($user_field))); } $tpl->parse(); -- 2.34.1