]> sipb.mit.edu Git - ikiwiki.git/commitdiff
edittemplate: Work around bug #551499 in CGI::FormBuilder.
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 18 Oct 2009 17:56:35 +0000 (13:56 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 18 Oct 2009 17:56:35 +0000 (13:56 -0400)
IkiWiki/Plugin/edittemplate.pm
debian/changelog

index e8e7b1e04b286739fb55ba40f81ddc8c913ac304..a163b0d84c3b28cee03ab3eecd24744ee5a2fc65 100644 (file)
@@ -83,10 +83,13 @@ sub formbuilder (@) {
        foreach my $field ($form->field) {
                if ($field eq 'page') {
                        @page_locs=$field->def_value;
-                       push @page_locs, $field->options;
+
+                       # FormBuilder is on the bad crack. See #551499
+                       my @options=map { ref $_ ? @$_ : $_ } $field->options;
+
+                       push @page_locs, @options;
                }
        }
-
        foreach my $p (@page_locs) {
                foreach my $registering_page (keys %pagestate) {
                        if (exists $pagestate{$registering_page}{edittemplate}) {
index 81935f9983d82b5ca16223e72695ccc1b5094438..95dc8c6b2a72495d5fccc05b1fd48a61bc4f0b89 100644 (file)
@@ -2,6 +2,7 @@ ikiwiki (3.20091018) UNRELEASED; urgency=low
 
   * edittemplate: Allow template page name to be specified using anything
     legal for a wikilink (including eg, leading slashes).
+  * edittemplate: Work around bug #551499 in CGI::FormBuilder.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 18 Oct 2009 13:44:09 -0400