]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
authorJoey Hess <joey@kitenet.net>
Sat, 20 Nov 2010 18:54:51 +0000 (14:54 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 20 Nov 2010 18:54:51 +0000 (14:54 -0400)
IkiWiki/Plugin/edittemplate.pm
debian/changelog

index 576c94be4fdcb6736501ef0d139935883a1149d7..061242fd82c1f1a76251dac12f8017821688a2a1 100644 (file)
@@ -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;
                                        }
                                }
index ecd028a0c92214ee1f4d92766e33b5ca81f62427..d236361d22b540608e9b7bf3b3f4ee26afab8528 100644 (file)
@@ -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