diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-12-29 04:49:55 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-12-29 04:49:55 +0000 |
commit | b5e2afa94390dd3349fed81f72892da3beba56ed (patch) | |
tree | 3ad19f66a38d8b82235b6c4197f06724010185c0 | |
parent | 178ab4c51cc64ad5fcfb191c1f93118b40d099c0 (diff) | |
download | ikiwiki-b5e2afa94390dd3349fed81f72892da3beba56ed.tar ikiwiki-b5e2afa94390dd3349fed81f72892da3beba56ed.tar.gz |
* Allow disabling of plugins included in goodstuff.
-rw-r--r-- | IkiWiki.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Setup/Standard.pm | 6 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/index/discussion.mdwn | 2 | ||||
-rwxr-xr-x | ikiwiki.in | 2 |
5 files changed, 7 insertions, 8 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index faca32835..2ee27ac3e 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -129,6 +129,8 @@ sub loadplugins () { #{{{ sub loadplugin ($) { #{{{ my $plugin=shift; + return if grep { $_ eq $plugin} @{$config{disable_plugins}}; + my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin); eval qq{use $mod}; if ($@) { diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 1e65b23e3..0c4272286 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -24,12 +24,6 @@ sub setup_standard { push @{$setup{plugin}}, @{$setup{add_plugins}}; delete $setup{add_plugins}; } - if (exists $setup{disable_plugins}) { - foreach my $plugin (@{$setup{disable_plugins}}) { - $setup{plugin}=[grep { $_ ne $plugin } @{$setup{plugin}}]; - } - delete $setup{disable_plugins}; - } if (exists $setup{exclude}) { push @{$config{wiki_file_prune_regexps}}, $setup{exclude}; } diff --git a/debian/changelog b/debian/changelog index 1347f1949..50d970bb8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,9 @@ ikiwiki (1.37) UNRELEASED; urgency=low is available for translation. * Export gettext() from IkiWiki module. * Don't put discussion links on discussion pages. + * Allow disabling of plugins included in goodstuff. - -- Joey Hess <joeyh@debian.org> Thu, 28 Dec 2006 23:40:57 -0500 + -- Joey Hess <joeyh@debian.org> Thu, 28 Dec 2006 23:49:11 -0500 ikiwiki (1.36) unstable; urgency=low diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index 3c51ad99e..741a8d9dc 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -213,3 +213,5 @@ Ok, that's my last 2 cents for a while. --[Mazirian](http://mazirian.com) Some installs of PerlMagick require X11. I tried to first disable using "img" by using "--disable-plugin img" in the Makefile. But still failed. My workaround was to remove "img" from the bundle in IkiWiki/Plugin/goodstuff.pm before building. What is the recommended way to install ikiwiki without "img" support? --[[JeremyReed]] + +> I've fixed this in svn so plugins in goodstuff can be disabled. --[[Joey]] diff --git a/ikiwiki.in b/ikiwiki.in index 11d562523..c762712ba 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -65,7 +65,7 @@ sub getconfig () { #{{{ push @{$config{plugin}}, $_[1]; }, "disable-plugin=s@" => sub { - $config{plugin}=[grep { $_ ne $_[1] } @{$config{plugin}}]; + push @{$config{disable_plugins}}, $_[1]; }, "pingurl=s" => sub { push @{$config{pingurl}}, $_[1]; |