X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6154dd03cb9f46f58c04f91c12ac9e42c696dbbb..2faf1ec601d88a231d5c1399a789badc0e300c29:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 0746ef24b..bfa85343d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -115,7 +115,7 @@ sub getsetup () { #{{{ openid signinedit lockedit conditional recentchanges parentlinks}], description => "plugins to enable by default", - safe => 1, + safe => 0, rebuild => 1, }, add_plugins => { @@ -412,13 +412,6 @@ sub checkconfig () { #{{{ $config{wikistatedir}="$config{srcdir}/.ikiwiki" unless exists $config{wikistatedir}; - - if ($config{rcs}) { - loadplugin($config{rcs}); - } - else { - loadplugin("norcs"); - } if (defined $config{umask}) { umask(possibly_foolish_untaint($config{umask})); @@ -433,14 +426,14 @@ sub listplugins () { #{{{ my %ret; foreach my $dir (@INC, $config{libdir}) { - next unless defined $dir; + next unless defined $dir && length $dir; foreach my $file (glob("$dir/IkiWiki/Plugin/*.pm")) { my ($plugin)=$file=~/.*\/(.*)\.pm$/; $ret{$plugin}=1; } } foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") { - next unless defined $dir; + next unless defined $dir && length $dir; foreach my $file (glob("$dir/plugins/*")) { $ret{basename($file)}=1 if -x $file; } @@ -450,11 +443,21 @@ sub listplugins () { #{{{ } #}}} sub loadplugins () { #{{{ - if (defined $config{libdir}) { + if (defined $config{libdir} && length $config{libdir}) { unshift @INC, possibly_foolish_untaint($config{libdir}); } loadplugin($_) foreach @{$config{default_plugins}}, @{$config{add_plugins}}; + + if ($config{rcs}) { + if (exists $IkiWiki::hooks{rcs}) { + error(gettext("cannot use multiple rcs plugins")); + } + loadplugin($config{rcs}); + } + if (! exists $IkiWiki::hooks{rcs}) { + loadplugin("norcs"); + } run_hooks(getopt => sub { shift->() }); if (grep /^-/, @ARGV) {