]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 119657 - template error checking
authorbbaetz%student.usyd.edu.au <>
Fri, 1 Mar 2002 13:57:43 +0000 (13:57 +0000)
committerbbaetz%student.usyd.edu.au <>
Fri, 1 Mar 2002 13:57:43 +0000 (13:57 +0000)
r=gerv, justdave

globals.pl

index 13b925e642d0600386f8b7dbc9092f3fc36f7235..6052424991ca0b93c90b878876a38634f362b8bc 100644 (file)
@@ -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.