Revision d4a434e1
Von Bernd Blessmann vor fast 13 Jahren hinzugefügt
bin/mozilla/admin.pl | ||
---|---|---|
431 | 431 |
closedir TEMPLATEDIR; |
432 | 432 |
|
433 | 433 |
@alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; |
434 |
@alldir = grep !/^(webpages|mastertemplates|\.svn)$/, @alldir;
|
|
434 |
@alldir = grep !/^(webpages|print|\.svn)$/, @alldir;
|
|
435 | 435 |
|
436 | 436 |
$form->{ALL_TEMPLATES} = [ map { { "name", => $_, "selected" => $_ eq $myconfig->{templates} } } @alldir ]; |
437 | 437 |
|
438 | 438 |
# mastertemplates |
439 |
opendir TEMPLATEDIR, "$::lx_office_conf{paths}->{templates}/mastertemplates" or $form->error("$::lx_office_conf{paths}->{templates}/mastertemplates" . " : $ERRNO");
|
|
439 |
opendir TEMPLATEDIR, "$::lx_office_conf{paths}->{templates}/print" or $form->error("$::lx_office_conf{paths}->{templates}/print" . " : $ERRNO");
|
|
440 | 440 |
my @allmaster = readdir(TEMPLATEDIR); |
441 | 441 |
closedir TEMPLATEDIR; |
442 | 442 |
|
443 |
@allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/mastertemplates" . "/$_") && !/^\.\.?$/ } @allmaster;
|
|
443 |
@allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ } @allmaster;
|
|
444 | 444 |
@allmaster = reverse grep !/Default/, @allmaster; |
445 | 445 |
push @allmaster, 'Default'; |
446 | 446 |
@allmaster = reverse @allmaster; |
... | ... | |
544 | 544 |
# copy templates to the directory |
545 | 545 |
|
546 | 546 |
my $oldcurrdir = getcwd(); |
547 |
if (!chdir("$::lx_office_conf{paths}->{templates}/mastertemplates/$form->{mastertemplates}")) {
|
|
548 |
$form->error("$ERRNO: chdir $::lx_office_conf{paths}->{templates}/mastertemplates/$form->{mastertemplates}");
|
|
547 |
if (!chdir("$::lx_office_conf{paths}->{templates}/print/$form->{mastertemplates}")) {
|
|
548 |
$form->error("$ERRNO: chdir $::lx_office_conf{paths}->{templates}/print/$form->{mastertemplates}");
|
|
549 | 549 |
} |
550 | 550 |
|
551 | 551 |
my $newdir = File::Spec->catdir($oldcurrdir, $form->{templates}); |
Auch abrufbar als: Unified diff
Verzeichnis für Druckvorlagensätze von mastertemplates in print umbenannt.