summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-03-01 14:57:43 +0100
committerbbaetz%student.usyd.edu.au <>2002-03-01 14:57:43 +0100
commitbeded135d0c2579e034c051e631c670f7b5d95c4 (patch)
tree250521a152c3c430e6cb5ec1e2e5608865fbea16 /globals.pl
parentd0e08d069d70cfa2b3ece8eb83d6b6dd5d917ca5 (diff)
downloadbugzilla-beded135d0c2579e034c051e631c670f7b5d95c4.tar.gz
bugzilla-beded135d0c2579e034c051e631c670f7b5d95c4.tar.xz
Bug 119657 - template error checking
r=gerv, justdave
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/globals.pl b/globals.pl
index 13b925e64..605242499 100644
--- a/globals.pl
+++ b/globals.pl
@@ -1584,7 +1584,7 @@ use Template;
# Create the global template object that processes templates and specify
# configuration parameters that apply to all templates processed in this script.
-$::template = Template->new(
+$::template ||= Template->new(
{
# Colon-separated list of directories containing templates.
INCLUDE_PATH => "template/custom:template/default" ,
@@ -1596,6 +1596,9 @@ $::template = Template->new(
PRE_CHOMP => 1 ,
TRIM => 1 ,
+ COMPILE_EXT => ".ttc",
+ COMPILE_DIR => "data/templates",
+
# Functions for processing text within templates in various ways.
FILTERS =>
{
@@ -1614,7 +1617,8 @@ $::template = Template->new(
}
} ,
}
-);
+) || DisplayError("Template creation failed: " . Template->error())
+ && exit;
# Use the Toolkit Template's Stash module to add utility pseudo-methods
# to template variables.