X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=3b37dab5ea5800b456fd19e9c63ee8542fc5f3dc;hb=840aea131eef33512dccc13184e01affafaafb37;hp=8cd79a4c558e747d2fea8726a3f17b0a0f82acb0;hpb=a1b353ecfa73af25d82af151077d9bc25253d253;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 8cd79a4c5..3b37dab5e 100644 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -440,11 +440,12 @@ sub form_header { } opendir TEMPLATEDIR, "$templates/." or $form->error("$templates : $!"); - @all = grep !/^\.\.?$/, readdir TEMPLATEDIR; + my @all = readdir(TEMPLATEDIR); + my @alldir = sort(grep({ -d "$templates/$_" && !/^\.\.?$/ } @all)); + my @allhtml = sort(grep({ -f "$templates/$_" && /\.html$/ } @all)); closedir TEMPLATEDIR; - @allhtml = sort grep /\.html/, @all; - @alldir = grep !/\.(html|tex|sty|odt)$/, @all; + @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; @alldir = grep !/^(webpages|\.svn)$/, @alldir; @allhtml = reverse grep !/Default/, @allhtml; @@ -472,9 +473,13 @@ sub form_header { } } - opendir CSS, "css/."; - @all = grep /.*\.css$/, readdir CSS; - closedir CSS; +# opendir CSS, "css/."; +# @all = grep /.*\.css$/, readdir CSS; +# closedir CSS; + +# css dir has styles that are not intended as general layouts. +# reverting to hardcoded list + @all = qw(lx-office-erp.css Win2000.css); foreach $item (@all) { if ($item eq $myconfig->{stylesheet}) { @@ -483,12 +488,16 @@ sub form_header { $selectstylesheet .= qq|