From 9f7a118ffc4c16c0810ce8f5ecaa0b6a577f523f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 13 Jun 2010 10:23:05 -0400 Subject: [PATCH] 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. --- IkiWiki/Plugin/websetup.pm | 8 ++------ 1 file 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 ($$) { -- 2.26.2