[wellwell-devel] [wellwell] Let [form] log an error on missing form template.
Git
wellwell-devel at rt.icdevgroup.org
Tue Jul 23 09:59:23 UTC 2013
commit 7b7cd0fcdf3246f5591ad633d8aa2b18d0a694fa
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Tue Jul 23 11:58:38 2013 +0200
Let [form] log an error on missing form template.
code/form.tag | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/code/form.tag b/code/form.tag
index 5e9c96c..97b8679 100644
--- a/code/form.tag
+++ b/code/form.tag
@@ -227,14 +227,15 @@ sub {
my ($out, $url, $action, $sid, $series, $body, $page);
# read template
- my ($t_name, $t_file, $t_template);
+ my ($t_name, $t_file, $t_template, $t_msg);
$t_name = $opt->{template} || 'form';
$t_file = "$Variable->{MV_TEMPLATE_DIR}/$t_name";
-
+
unless ($t_template = $Tag->file($t_file)) {
$Tag->error({name => 'form_template',
- set => "Invalid template $t_name"});
+ set => "Missing form template $t_name"});
+ Log("Form template $t_name not found as $t_file");
return;
}
More information about the wellwell-devel
mailing list