зеркало из https://github.com/mozilla/pjs.git
Fix for bug 226217: check_languages bustage resulting from sanitizing in
bug 199502. Applied myk's suggestion in patch checked in. r=myk, a=myk.
This commit is contained in:
Родитель
c939d4302c
Коммит
84330b314d
|
@ -150,13 +150,13 @@ sub check_loginmethod {
|
|||
}
|
||||
|
||||
sub check_languages {
|
||||
my @languages = split /,/, trim($_);
|
||||
my @languages = split /[,\s]+/, trim($_[0]);
|
||||
if(!scalar(@languages)) {
|
||||
return "You need to specify a language tag."
|
||||
}
|
||||
foreach my $language (@languages) {
|
||||
if( ! -d 'template/'.trim($language).'/custom'
|
||||
&& ! -d 'template/'.trim($language).'/default') {
|
||||
if( ! -d "template/$language/custom"
|
||||
&& ! -d "template/$language/default") {
|
||||
return "The template directory for $language does not exist";
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче