From 17592a951bf06ede47f500af25308e9c68944279 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 13 Jun 2010 10:21:19 -0400 Subject: websetup: Allow enabling plugins listed in disable_plugins. The bug here was that disabling a plugin included thru goodstuff, like htmlscrubber, caused it to be added to disable_plugins, and those plugins were never loaded, so could not be re-enabled. Fix by allowing them to be force loaded when appropriate. (Also that allows disabled plugins to still record their setup options when dumping a setup file.) --- IkiWiki.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index d2ed99923..203da3ba2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -592,10 +592,11 @@ sub loadplugins () { return 1; } -sub loadplugin ($) { +sub loadplugin ($;$) { my $plugin=shift; + my $force=shift; - return if grep { $_ eq $plugin} @{$config{disable_plugins}}; + return if ! $force && grep { $_ eq $plugin} @{$config{disable_plugins}}; foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef, "$installdir/lib/ikiwiki") { -- cgit v1.2.3