diff options
author | Joey Hess <joey@kitenet.net> | 2010-06-13 10:23:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-06-13 10:25:17 -0400 |
commit | 9f7a118ffc4c16c0810ce8f5ecaa0b6a577f523f (patch) | |
tree | 73cb05759e3523476ab301fd3cb4198a359d97ca /IkiWiki | |
parent | 17592a951bf06ede47f500af25308e9c68944279 (diff) |
more symetric enable/disable
Removing a plugin from add_plugins is not always enough to disable it.
It may have been redundantly added there and also pulled in via goodstuff.
Always add didabled plugins to disable_plugins.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/websetup.pm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index c4b75c4b3..11b4428e3 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -253,12 +253,8 @@ sub enable_plugin ($) { sub disable_plugin ($) { my $plugin=shift; - if (grep { $_ eq $plugin } @{$config{add_plugins}}) { - $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}]; - } - else { - push @{$config{disable_plugins}}, $plugin; - } + $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}]; + push @{$config{disable_plugins}}, $plugin; } sub showform ($$) { |