From 8c1a3595d49760ecedd7e56b6f2f2c5f2271b85d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Sep 2010 14:12:59 -0400 Subject: [PATCH] avoid dups getting into @slavelanguages This could happen if checkconfig was run twice, I think. --- IkiWiki/Plugin/po.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index d920d3648..ab39cca12 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -152,7 +152,7 @@ sub checkconfig () { if (ref $config{po_slave_languages} eq 'ARRAY') { foreach my $pair (@{$config{po_slave_languages}}) { my ($code, $name)=splitlangpair($pair); - if (defined $code) { + if (defined $code && ! exists $slavelanguages{$code}) { push @slavelanguages, $code; $slavelanguages{$code} = $name; } -- 2.39.5