minor code changes

master
Joey Hess 2009-03-29 14:31:32 -04:00
parent 055be361f5
commit c84b4cefcc
1 changed files with 2 additions and 4 deletions

View File

@ -32,7 +32,7 @@ sub import {
hook(type => "getsetup", id => "po", call => \&getsetup); hook(type => "getsetup", id => "po", call => \&getsetup);
hook(type => "checkconfig", id => "po", call => \&checkconfig); hook(type => "checkconfig", id => "po", call => \&checkconfig);
hook(type => "needsbuild", id => "po", call => \&needsbuild); 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 => "filter", id => "po", call => \&filter);
hook(type => "htmlize", id => "po", call => \&htmlize); hook(type => "htmlize", id => "po", call => \&htmlize);
hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1); hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1);
@ -141,9 +141,7 @@ sub checkconfig () {
! defined $config{po_link_to}) { ! defined $config{po_link_to}) {
$config{po_link_to}='default'; $config{po_link_to}='default';
} }
elsif (! grep { elsif ($config{po_link_to} !~ /^(default|current|negotiated)$/) {
$config{po_link_to} eq $_
} ('default', 'current', 'negotiated')) {
warn(sprintf(gettext('%s is not a valid value for po_link_to, falling back to 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}));
$config{po_link_to}='default'; $config{po_link_to}='default';