diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-20 14:54:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-20 14:54:43 -0400 |
commit | 31f0e459b8143cd986f04d122d255f4d0f44a505 (patch) | |
tree | 820e665c81fd51866c60bc1641e6bbdc799bb88e | |
parent | af5f162ca7c8cd14d64f6282e05a3032dbd7c2fb (diff) | |
download | ikiwiki-31f0e459b8143cd986f04d122d255f4d0f44a505.tar ikiwiki-31f0e459b8143cd986f04d122d255f4d0f44a505.tar.gz |
edittemplate: Fix crash if using a .tmpl file or other non-page file as a template for a new page.
-rw-r--r-- | IkiWiki/Plugin/edittemplate.pm | 6 | ||||
-rw-r--r-- | debian/changelog | 2 |
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 |