]> sipb.mit.edu Git - ikiwiki.git/commitdiff
minor code changes
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 29 Mar 2009 18:31:32 +0000 (14:31 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 29 Mar 2009 18:31:32 +0000 (14:31 -0400)
IkiWiki/Plugin/po.pm

index f25beba7236c69c742686d0f7ade6daa0f24a25d..5756f8f5598045cfa3acd9a00365b9cd7c8f9d04 100644 (file)
@@ -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 => "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);
        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';
        }
            ! 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';
                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';