Subversion Repositories

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

Rev 38 | Rev 86 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

--- a/lib/template_expand.c
+++ b/lib/template_expand.c
@@ -496,11 +496,11 @@ template_expand_call(struct template_cal
     char *s, *t;
     char *err = NIL;
 
-    if (tvals->use_compiled)
+    if (tvals->use_compiled ||
+        !(template = template_parse(tvals->dir, tvals->set,
+                                    item->name, tvals->pool)))
         template = template_find(tvals->set, item->name, tvals->pool);
-    else
-        template = template_parse(tvals->dir, tvals->set,
-                                  item->name, tvals->pool);
+
     if (!template) {
         str_printf(state->error,
                    "Template \"%s\" not found (CALL from template \"%s\")\n",
@@ -579,11 +579,11 @@ template_expand(char *name, struct templ
     struct str *error = tvals->error;
     char *err;
 
-    if (tvals->use_compiled) {
+    if (tvals->use_compiled ||
+        !(template = template_parse(tvals->dir, tvals->set,
+                                    name, tvals->pool)))
         template = template_find(tvals->set, name, tvals->pool);
-    } else {
-        template = template_parse(tvals->dir, tvals->set, name, tvals->pool);
-    }
+
     if (!template) {
         str_printf(tvals->error,
                    "Template %s not found (top level template_expand())",
--- a/files/etc/prayer.cf.SRC
+++ b/files/etc/prayer.cf.SRC
@@ -452,7 +452,7 @@ pid_dir             = "$var_prefix"
 ######################################################################
 # Template stuff
 
-template_path = "__PREFIX__/templates"
+template_path = "/etc/prayer/templates"
 template_set  = "xhtml_strict"
 template_use_compiled = TRUE