Bug 16194: Do not consider xslt as valid theme dir in LangInstaller.pm
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Mon, 4 Apr 2016 13:59:37 +0000 (10:59 -0300)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Tue, 5 Apr 2016 15:18:06 +0000 (15:18 +0000)
Bug 15527 add an xslt dir, LangInstaller.pm must ingnore that dir.

To test:
1) Verify the problem on current master
Update translation for any lang, will see errors

2) Apply the patch

3) Update again, no errors

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
misc/translator/LangInstaller.pm

index 5244945..683897d 100644 (file)
@@ -110,7 +110,7 @@ sub new {
 
     # OPAC themes
     opendir my $dh, $context->config('opachtdocs');
-    for my $theme ( grep { not /^\.|lib/ } readdir($dh) ) {
+    for my $theme ( grep { not /^\.|lib|xslt/ } readdir($dh) ) {
         push @{$self->{interface}}, {
             name   => "OPAC $theme",
             dir    => "$opachtdocs/$theme",
@@ -123,7 +123,7 @@ sub new {
         # search for strings on staff & opac marc files
         my $dirs = $context->config('intrahtdocs') . '/prog';
         opendir $fh, $context->config('opachtdocs');
-        for ( grep { not /^\.|\.\.|lib$/ } readdir($fh) ) {
+        for ( grep { not /^\.|\.\.|lib$|xslt/ } readdir($fh) ) {
             $dirs .= ' ' . "$opachtdocs/$_";
         }
         push @{$self->{interface}}, {