]> sipb.mit.edu Git - ikiwiki.git/commitdiff
avoid adding extra disabled fields for arrays
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 18:41:53 +0000 (14:41 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 18:41:53 +0000 (14:41 -0400)
IkiWiki/Plugin/websetup.pm

index d087b4863148c19797d6cd1c6f7aa38398e04c4a..bfc238dc35443116b37999f89aaea6c8d21f7194 100644 (file)
@@ -110,14 +110,15 @@ sub showfields ($$$@) { #{{{
                        }
                }
 
+               # multiple plugins can have the same field
+               my $name=defined $plugin ? $plugin.".".$key : $key;
+
                my $value=$config{$key};
-               if (ref $config{$key} eq 'ARRAY' || ref $info{example} eq 'ARRAY') {
+
+               if ($info{safe} && (ref $config{$key} eq 'ARRAY' || ref $info{example} eq 'ARRAY')) {
                        push @{$value}, "", ""; # blank items for expansion
                }
 
-               # multiple plugins can have the same field
-               my $name=defined $plugin ? $plugin.".".$key : $key;
-
                if ($info{type} eq "string") {
                        $form->field(
                                name => $name,