Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 79 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
38 magnus 1
--- a/lib/template_expand.c
2
+++ b/lib/template_expand.c
86 magnus 3
@@ -475,11 +475,11 @@ template_expand_call(struct template_cal
38 magnus 4
     char *s, *t;
5
     char *err = NIL;
6
 
7
-    if (tvals->use_compiled)
8
+    if (tvals->use_compiled ||
9
+        !(template = template_parse(tvals->dir, tvals->set,
10
+                                    item->name, tvals->pool)))
11
         template = template_find(tvals->set, item->name, tvals->pool);
12
-    else
13
-        template = template_parse(tvals->dir, tvals->set,
14
-                                  item->name, tvals->pool);
15
+
16
     if (!template) {
17
         str_printf(state->error,
18
                    "Template \"%s\" not found (CALL from template \"%s\")\n",
86 magnus 19
@@ -558,11 +558,11 @@ template_expand(char *name, struct templ
38 magnus 20
     struct str *error = tvals->error;
21
     char *err;
22
 
23
-    if (tvals->use_compiled) {
24
+    if (tvals->use_compiled ||
25
+        !(template = template_parse(tvals->dir, tvals->set,
42 magnus 26
+                                    name, tvals->pool)))
38 magnus 27
         template = template_find(tvals->set, name, tvals->pool);
28
-    } else {
29
-        template = template_parse(tvals->dir, tvals->set, name, tvals->pool);
30
-    }
31
+
32
     if (!template) {
33
         str_printf(tvals->error,
86 magnus 34
                    "Template %s not found (top level template_expand())\n",
38 magnus 35
--- a/files/etc/prayer.cf.SRC
36
+++ b/files/etc/prayer.cf.SRC
86 magnus 37
@@ -444,7 +444,7 @@ pid_dir             = "$var_prefix"
38 magnus 38
 ######################################################################
39
 # Template stuff
40
 
41
-template_path = "__PREFIX__/templates"
42
+template_path = "/etc/prayer/templates"
86 magnus 43
 template_set  = "old"
38 magnus 44
 template_use_compiled = TRUE
45