X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=6d518fcbdef8f871a8388afa0c30b19dd7d46e46;hb=540030ff9826439d94f3f4292ab79b9be8795acc;hp=9fe0bab6847deb37d10405a0be69ff9a4ef1b483;hpb=8f09673745acf3c55ad511142dd6b7a85deeebbd;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 9fe0bab68..6d518fcbd 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -61,6 +61,13 @@ require "bin/mozilla/admin_printer.pl"; use strict; +# parserhappy(R): + +# $locale->text('periodic') +# $locale->text('income') +# $locale->text('perpetual') +# $locale->text('balance') + our $cgi; our $form; our $locale; @@ -431,16 +438,16 @@ sub edit_user_form { closedir TEMPLATEDIR; @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; - @alldir = grep !/^(webpages|mastertemplates|\.svn)$/, @alldir; + @alldir = grep !/^(webpages|print|\.svn)$/, @alldir; $form->{ALL_TEMPLATES} = [ map { { "name", => $_, "selected" => $_ eq $myconfig->{templates} } } @alldir ]; # mastertemplates - opendir TEMPLATEDIR, "$::lx_office_conf{paths}->{templates}/mastertemplates" or $form->error("$::lx_office_conf{paths}->{templates}/mastertemplates" . " : $ERRNO"); + opendir TEMPLATEDIR, "$::lx_office_conf{paths}->{templates}/print" or $form->error("$::lx_office_conf{paths}->{templates}/print" . " : $ERRNO"); my @allmaster = readdir(TEMPLATEDIR); closedir TEMPLATEDIR; - @allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/mastertemplates" . "/$_") && !/^\.\.?$/ } @allmaster; + @allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ } @allmaster; @allmaster = reverse grep !/Default/, @allmaster; push @allmaster, 'Default'; @allmaster = reverse @allmaster; @@ -544,8 +551,8 @@ sub save_user { # copy templates to the directory my $oldcurrdir = getcwd(); - if (!chdir("$::lx_office_conf{paths}->{templates}/mastertemplates/$form->{mastertemplates}")) { - $form->error("$ERRNO: chdir $::lx_office_conf{paths}->{templates}/mastertemplates/$form->{mastertemplates}"); + if (!chdir("$::lx_office_conf{paths}->{templates}/print/$form->{mastertemplates}")) { + $form->error("$ERRNO: chdir $::lx_office_conf{paths}->{templates}/print/$form->{mastertemplates}"); } my $newdir = File::Spec->catdir($oldcurrdir, $form->{templates}); @@ -566,7 +573,7 @@ sub save_user { chdir($oldcurrdir); $form->error("$ERRNO: symlink $File::Find::name"); } - } elsif (-f $_ && $_ =~ m/.*?\.(html|tex|sty|odt|xml|txb|eps|pdf|png|jpg)$/) { + } elsif (-f $_) { if (!copy($_, File::Spec->catfile($newdir, $File::Find::name))) { chdir($oldcurrdir); $form->error("$ERRNO: cp $File::Find::name");