Commit 95973482 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 287763: Receiving Error - Insecure dependency in require... - Patch by byron…

Bug 287763: Receiving Error - Insecure dependency in require... - Patch by byron jones (glob) <bugzilla@glob.com.au> r=joel a=myk
parent 0228a007
...@@ -226,15 +226,15 @@ sub check_languages { ...@@ -226,15 +226,15 @@ sub check_languages {
sub find_languages { sub find_languages {
my @languages = (); my @languages = ();
opendir(DIR, $templatedir) || return "Can't open 'template' directory: $!"; opendir(DIR, $templatedir) || return "Can't open 'template' directory: $!";
my @langdirs = grep { /^[a-z-]+$/i } readdir(DIR); foreach my $dir (readdir(DIR)) {
closedir DIR; next unless $dir =~ /^([a-z-]+)$/i;
my $lang = $1;
foreach my $lang (@langdirs) {
next if($lang =~ /^CVS$/i); next if($lang =~ /^CVS$/i);
my $deft_path = File::Spec->catdir('template', $lang, 'default'); my $deft_path = File::Spec->catdir('template', $lang, 'default');
my $cust_path = File::Spec->catdir('template', $lang, 'custom'); my $cust_path = File::Spec->catdir('template', $lang, 'custom');
push(@languages, $lang) if(-d $deft_path or -d $cust_path); push(@languages, $lang) if(-d $deft_path or -d $cust_path);
} }
closedir DIR;
return join(', ', @languages); return join(', ', @languages);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment