aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--IkiWiki.pm7
-rw-r--r--debian/changelog6
2 files changed, 11 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;
diff --git a/debian/changelog b/debian/changelog
index 209b170eb..c27af5615 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ikiwiki (3.20100723) UNRELEASED; urgency=low
+
+ * template: Fix dependency tracking. Broken in version 3.20100427.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 23 Jul 2010 14:00:32 -0400
+
ikiwiki (3.20100722) unstable; urgency=low
* img: Add a margin around images displayed by this directive.