]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 287763: Receiving Error - Insecure dependency in require... - Patch by byron...
authorlpsolit%gmail.com <>
Thu, 7 Apr 2005 15:08:36 +0000 (15:08 +0000)
committerlpsolit%gmail.com <>
Thu, 7 Apr 2005 15:08:36 +0000 (15:08 +0000)
defparams.pl

index 5e2110d6143b26bb2ae984af23705738cbf305ef..60a2d7726e47453e6275bec87fd35144312859f5 100644 (file)
@@ -226,15 +226,15 @@ sub check_languages {
 sub find_languages {
     my @languages = ();
     opendir(DIR, $templatedir) || return "Can't open 'template' directory: $!";
-    my @langdirs = grep { /^[a-z-]+$/i } readdir(DIR);
-    closedir DIR;
-
-    foreach my $lang (@langdirs) {
+    foreach my $dir (readdir(DIR)) {
+        next unless $dir =~ /^([a-z-]+)$/i;
+        my $lang = $1;
         next if($lang =~ /^CVS$/i);
         my $deft_path = File::Spec->catdir('template', $lang, 'default');
         my $cust_path = File::Spec->catdir('template', $lang, 'custom');
         push(@languages, $lang) if(-d $deft_path or -d $cust_path);
     }
+    closedir DIR;
     return join(', ', @languages);
 }