projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98cc946
)
po: check validity of po_slave_languages array.
author
intrigeri
<intrigeri@boum.org>
Sun, 11 Jul 2010 10:28:02 +0000
(12:28 +0200)
committer
intrigeri
<intrigeri@boum.org>
Sun, 11 Jul 2010 10:28:02 +0000
(12:28 +0200)
IkiWiki/Plugin/po.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/po.pm
b/IkiWiki/Plugin/po.pm
index 9cb047992e724d88eb6d68a339c3e06d435c14ec..43804a8f2b38681112298058bab8f0b3e1360baa 100644
(file)
--- a/
IkiWiki/Plugin/po.pm
+++ b/
IkiWiki/Plugin/po.pm
@@
-141,6
+141,9
@@
sub checkconfig () {
if (ref $config{po_slave_languages} eq 'ARRAY') {
my %slaves;
+ if (@{$config{po_slave_languages}} % 2 != 0) {
+ error(sprintf(gettext("The %s field is invalid."), 'po_slave_languages'));
+ }
for (my $i=0; $i<@{$config{po_slave_languages}}; $i = $i + 2) {
$slaves{$config{po_slave_languages}->[$i]} = $config{po_slave_languages}->[$i + 1];
push @slavelanguages, $config{po_slave_languages}->[$i];