Subversion Repositories prayer

Compare Revisions

Ignore whitespace Rev 37 → Rev 38

/trunk/debian/patches/templates_fallback_to_compiled.patch
0,0 → 1,45
--- 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,
+ item->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
/trunk/debian/changelog
28,8 → 28,14
distribution tarball) in /usr/share/doc/prayer/examples instead.
* Do not install prayer-chroot (too experimental, hardcoded chroot path)
or prayer-sem-prune (does nothing that ipcrm cannot do).
* templates_fallback_to_compiled.patch (new): If the
template_use_compiled option is false, nevertheless use compiled-in
templates in template_expand.c if the requested template cannot be
found on disk. Change default template_path to /etc/prayer/templates.
Install said directory as well as subdirectories for available
template sets.
 
-- Magnus Holmgren <holmgren@debian.org> Mon, 23 Jun 2008 21:37:23 +0200
-- Magnus Holmgren <holmgren@debian.org> Mon, 23 Jun 2008 22:17:02 +0200
 
prayer (1.2.0-1) unstable; urgency=low
 
/trunk/debian/prayer.dirs
1,2 → 1,4
var/run/prayer
var/log/prayer
etc/prayer/templates/xhtml_transitional
etc/prayer/templates/xhtml_strict