From c84b4cefccf5c3d0a642429c5d9972c4ff39a47a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 29 Mar 2009 14:31:32 -0400 Subject: [PATCH] minor code changes --- IkiWiki/Plugin/po.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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'; -- 2.26.2