From: Joey Hess Date: Sun, 29 Mar 2009 18:31:32 +0000 (-0400) Subject: minor code changes X-Git-Tag: 3.15~195 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c84b4cefccf5c3d0a642429c5d9972c4ff39a47a;p=ikiwiki.git minor code changes --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index f25beba72..5756f8f55 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -32,7 +32,7 @@ sub import { hook(type => "getsetup", id => "po", call => \&getsetup); hook(type => "checkconfig", id => "po", call => \&checkconfig); hook(type => "needsbuild", id => "po", call => \&needsbuild); - hook(type => "scan", id => "po", call => \&scan, last =>1); + hook(type => "scan", id => "po", call => \&scan, last => 1); hook(type => "filter", id => "po", call => \&filter); hook(type => "htmlize", id => "po", call => \&htmlize); hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1); @@ -141,9 +141,7 @@ sub checkconfig () { ! defined $config{po_link_to}) { $config{po_link_to}='default'; } - elsif (! grep { - $config{po_link_to} eq $_ - } ('default', 'current', 'negotiated')) { + elsif ($config{po_link_to} !~ /^(default|current|negotiated)$/) { warn(sprintf(gettext('%s is not a valid value for po_link_to, falling back to po_link_to=default'), $config{po_link_to})); $config{po_link_to}='default';