summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-03 14:41:53 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-03 14:41:53 -0400
commit5c0f539950540544a44756a04efcb3663993789d (patch)
tree74398e5ba084218edfc8b14b7c2f4547a61792b5 /IkiWiki
parentd00f3edf13ae77aa52cf6f7cd335f6e531cda3c0 (diff)
avoid adding extra disabled fields for arrays
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/websetup.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm
index d087b4863..bfc238dc3 100644
--- a/IkiWiki/Plugin/websetup.pm
+++ b/IkiWiki/Plugin/websetup.pm
@@ -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,