use strict;
+# parserhappy(R):
+
+# $locale->text('periodic')
+# $locale->text('income')
+# $locale->text('perpetual')
+# $locale->text('balance')
+
our $cgi;
our $form;
our $locale;
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;
# 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});
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");