diff options
author | Joey Hess <joey@kitenet.net> | 2010-06-13 10:21:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-06-13 10:21:19 -0400 |
commit | 17592a951bf06ede47f500af25308e9c68944279 (patch) | |
tree | 5b44ea533ae227b4a05ceb352bb314abb80201ac /IkiWiki.pm | |
parent | 89a970bd7d8cccf5362985ae293aba5626429095 (diff) | |
download | ikiwiki-17592a951bf06ede47f500af25308e9c68944279.tar ikiwiki-17592a951bf06ede47f500af25308e9c68944279.tar.gz |
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.)
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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") { |