aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-13 10:21:19 -0400
committerJoey Hess <joey@kitenet.net>2010-06-13 10:21:19 -0400
commit17592a951bf06ede47f500af25308e9c68944279 (patch)
tree5b44ea533ae227b4a05ceb352bb314abb80201ac /IkiWiki.pm
parent89a970bd7d8cccf5362985ae293aba5626429095 (diff)
downloadikiwiki-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.pm5
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") {