aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-07-23 14:14:25 -0400
committerJoey Hess <joey@kitenet.net>2010-07-23 14:14:25 -0400
commit1b0bef6d49722d37eca3e871e808e46b2a1461a3 (patch)
tree283e4b82b92f2524b8b968e2a6fdd7a82586de49 /IkiWiki.pm
parentd78578f1b8e37045f47876ca3b21afb9b36215d0 (diff)
downloadikiwiki-1b0bef6d49722d37eca3e871e808e46b2a1461a3.tar
ikiwiki-1b0bef6d49722d37eca3e871e808e46b2a1461a3.tar.gz
template: Fix dependency tracking. Broken in version 3.20100427.
template_depends was adding a dependency on the source filename, instead of on the page name when a template is a page. Such a dependency doesn't work.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 0c0b7bd4c..cfa4f5f03 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1730,12 +1730,15 @@ sub template_file ($) {
my $name=shift;
my $tpage=($name =~ s/^\///) ? $name : "templates/$name";
+ my $template;
if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) {
- $tpage=$pagesources{$tpage};
+ $template=srcfile($pagesources{$tpage}, 1);
$name.=".tmpl";
}
+ else {
+ $template=srcfile($tpage, 1);
+ }
- my $template=srcfile($tpage, 1);
if (defined $template) {
return $template, $tpage, 1 if wantarray;
return $template;