Bug 8623: Do not accept "lib" as a valid theme
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 13 Aug 2012 00:09:20 +0000 (20:09 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 5 Sep 2012 10:04:12 +0000 (12:04 +0200)
Since we are going to be storing third-party Javascript libraries in
koha-tmpl/opac-tmpl/lib and koha-tmpl/intranet-tmpl/lib, we want to make
sure that "lib" is not picked up as a theme in the system preferences
editor.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Koha.pm

index 22afed6..26106cf 100644 (file)
@@ -674,6 +674,7 @@ sub getallthemes {
     opendir D, "$htdocs";
     my @dirlist = readdir D;
     foreach my $directory (@dirlist) {
+        next if $directory eq 'lib';
         -d "$htdocs/$directory/en" and push @themes, $directory;
     }
     return @themes;