Rev 42 | Go to most recent revision | Details | 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 |
||
3 | @@ -496,11 +496,11 @@ template_expand_call(struct template_cal |
||
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", |
||
19 | @@ -579,11 +579,11 @@ template_expand(char *name, struct templ |
||
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, |
||
26 | + item->name, tvals->pool))) |
||
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, |
||
34 | "Template %s not found (top level template_expand())", |
||
35 | --- a/files/etc/prayer.cf.SRC |
||
36 | +++ b/files/etc/prayer.cf.SRC |
||
37 | @@ -452,7 +452,7 @@ pid_dir = "$var_prefix" |
||
38 | ###################################################################### |
||
39 | # Template stuff |
||
40 | |||
41 | -template_path = "__PREFIX__/templates" |
||
42 | +template_path = "/etc/prayer/templates" |
||
43 | template_set = "xhtml_strict" |
||
44 | template_use_compiled = TRUE |
||
45 |