summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/edittemplate.pm6
-rw-r--r--debian/changelog2
2 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index 576c94be4..061242fd8 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -107,9 +107,11 @@ sub formbuilder (@) {
my $template=$pagestate{$registering_page}{edittemplate}{$pagespec};
$form->field(name => "editcontent",
value => filltemplate($template, $page));
- $form->field(name => "type",
- value => pagetype($pagesources{$template}))
+ my $type=pagetype($pagesources{$template})
if $pagesources{$template};
+ $form->field(name => "type",
+ value => $type)
+ if defined $type;
return;
}
}
diff --git a/debian/changelog b/debian/changelog
index ecd028a0c..d236361d2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ ikiwiki (3.20101113) UNRELEASED; urgency=low
* Optimise glob() pagespec. (Thanks, Kathryn and smcv)
* highlight: Support new format of filetypes.conf used by version 3.2
of the highlight package.
+ * edittemplate: Fix crash if using a .tmpl file or other non-page file
+ as a template for a new page.
-- Joey Hess <joeyh@debian.org> Tue, 16 Nov 2010 14:23:47 -0400