From: Joey Hess Date: Sun, 13 Jun 2010 14:23:05 +0000 (-0400) Subject: more symetric enable/disable X-Git-Tag: 3.20100623~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9f7a118ffc4c16c0810ce8f5ecaa0b6a577f523f;p=ikiwiki.git 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. --- 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 ($$) {