po: fix interdiction to create pages of type po
authorintrigeri <intrigeri@boum.org>
Fri, 28 Aug 2009 10:38:07 +0000 (12:38 +0200)
committerintrigeri <intrigeri@boum.org>
Fri, 28 Aug 2009 10:38:07 +0000 (12:38 +0200)
... which was broken by the new page_types code.

Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 12f41f6de2d73c30ac543536d4940e49c0ae9a0a..b9f59f3e8c84bebcc7c79829f03c48036bd4d3e2 100644 (file)
@@ -533,7 +533,7 @@ sub formbuilder (@) {
                        next unless "$field" eq "type";
                        if ($field->type eq 'select') {
                                # remove po from the list of types
-                               my @types = grep { $_ ne 'po' } $field->options;
+                               my @types = grep { $_->[0] ne 'po' } $field->options;
                                $field->options(\@types) if @types;
                        }
                }