aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-12 20:48:19 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-12 20:48:19 +0000
commit8c8ce06a1b267a5c5d0b1a4f2b229b6d15e63b71 (patch)
treed829bc29734f5ae0abbe64728a1a5050cdc28347 /IkiWiki/CGI.pm
parentb26b1d51ab4e71fb04674815c6b08f401ec22993 (diff)
downloadikiwiki-8c8ce06a1b267a5c5d0b1a4f2b229b6d15e63b71.tar
ikiwiki-8c8ce06a1b267a5c5d0b1a4f2b229b6d15e63b71.tar.gz
* Search in default location for templates as a fallback when templatedir is
pointed elsewhere, so that only modified templates need to be copied into a templatedir. Based on work by JeremyReed.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 85fc1a386..b1f770b05 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -129,8 +129,7 @@ sub cgi_signin ($$) { #{{{
params => $q,
action => $config{cgiurl},
header => 0,
- template => (-e "$config{templatedir}/signin.tmpl" ?
- {template_params("signin.tmpl")} : ""),
+ template => scalar template_params("signin.tmpl"),
stylesheet => baseurl()."style.css",
);
my $buttons=["Login"];
@@ -198,8 +197,7 @@ sub cgi_prefs ($$) { #{{{
javascript => 0,
params => $q,
action => $config{cgiurl},
- template => (-e "$config{templatedir}/prefs.tmpl" ?
- {template_params("prefs.tmpl")} : ""),
+ template => scalar template_params("prefs.tmpl"),
stylesheet => baseurl()."style.css",
);
my $buttons=["Save Preferences", "Logout", "Cancel"];
@@ -293,8 +291,7 @@ sub cgi_editpage ($$) { #{{{
params => $q,
action => $config{cgiurl},
table => 0,
- template => (-e "$config{templatedir}/editpage.tmpl" ?
- {template_params("editpage.tmpl")} : ""),
+ template => scalar template_params("editpage.tmpl"),
);
run_hooks(formbuilder_setup => sub {