Revision e1e19a48
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
776 | 776 |
# OUT is used for the media, screen, printer, email |
777 | 777 |
# for postscript we store a copy in a temporary file |
778 | 778 |
my $fileid = time; |
779 |
$self->{tmpfile} ||= "$userspath/${fileid}.$self->{IN}"; |
|
779 |
my $prepend_userspath; |
|
780 |
|
|
781 |
if (!$self->{tmpfile}) { |
|
782 |
$self->{tmpfile} = "${fileid}.$self->{IN}"; |
|
783 |
$prepend_userspath = 1; |
|
784 |
} |
|
785 |
|
|
786 |
$prepend_userspath = 1 if substr($self->{tmpfile}, 0, length $userspath) eq $userspath; |
|
787 |
|
|
788 |
$self->{tmpfile} =~ s|.*/||; |
|
789 |
$self->{tmpfile} =~ s/[^a-zA-Z0-9\._\ \-]//g; |
|
790 |
$self->{tmpfile} = "$userspath/$self->{tmpfile}" if $prepend_userspath; |
|
780 | 791 |
|
781 | 792 |
if ($template->uses_temp_file() || $self->{media} eq 'email') { |
782 | 793 |
$out = $self->{OUT}; |
bin/mozilla/io.pl | ||
---|---|---|
1673 | 1673 |
|
1674 | 1674 |
$form->{templates} = "$myconfig{templates}"; |
1675 | 1675 |
|
1676 |
delete $form->{printer_command}; |
|
1677 |
|
|
1676 | 1678 |
$form->{language} = $form->get_template_language(\%myconfig); |
1677 | 1679 |
$form->{printer_code} = $form->get_printer_code(\%myconfig); |
1678 | 1680 |
|
... | ... | |
1737 | 1739 |
$form->{"IN"} =~ s/html$/odt/; |
1738 | 1740 |
} |
1739 | 1741 |
|
1742 |
delete $form->{OUT}; |
|
1743 |
|
|
1740 | 1744 |
if ($form->{media} eq 'printer') { |
1741 | 1745 |
$form->{OUT} = "| $form->{printer_command} &>/dev/null"; |
1742 | 1746 |
$form->{printed} .= " $form->{formname}"; |
... | ... | |
1754 | 1758 |
$emailed = $form->{emailed}; |
1755 | 1759 |
|
1756 | 1760 |
if ($form->{media} eq 'queue') { |
1757 |
%queued = split / /, $form->{queued}; |
|
1761 |
%queued = map { s|.*/|| } split / /, $form->{queued};
|
|
1758 | 1762 |
|
1759 | 1763 |
if ($filename = $queued{ $form->{formname} }) { |
1760 | 1764 |
$form->{queued} =~ s/$form->{formname} $filename//; |
bin/mozilla/ustva.pl | ||
---|---|---|
833 | 833 |
$file .= $form->{elstersteuernummer}; |
834 | 834 |
#file suffix |
835 | 835 |
$file .= '.xml'; |
836 |
$file =~ s|.*/||; |
|
836 | 837 |
$form->{tmpfile} = "$userspath/$file"; |
837 | 838 |
|
838 | 839 |
$form->{attachment_filename} = $file; |
... | ... | |
882 | 883 |
$form->{attachment_filename} = "USTVA-" . $form->{period} |
883 | 884 |
. sprintf("%02d", $form->{year} % 100) . ".txb"; |
884 | 885 |
|
886 |
$form->{attachment_filename} =~ s|.*/||; |
|
885 | 887 |
$form->{tmpfile} = "$userspath/" . $form->{attachment_filename}; |
886 | 888 |
|
887 | 889 |
# TODO: set Output to UTF-8 or system Preference |
users/.openoffice.org2/user/registry/data/org/openoffice/Office/Linguistic.xcu | ||
---|---|---|
7 | 7 |
</node> |
8 | 8 |
<node oor:name="ServiceManager"> |
9 | 9 |
<prop oor:name="DataFilesChangedCheckValue" oor:type="xs:int"> |
10 |
<value>-411764226</value>
|
|
10 |
<value>-1472371459</value>
|
|
11 | 11 |
</prop> |
12 | 12 |
<node oor:name="HyphenatorList"> |
13 | 13 |
<prop oor:name="de-AT" oor:op="replace" oor:type="xs:string"> |
Auch abrufbar als: Unified diff
$form->parse_template() sowie Template.pm benutzen $form->{OUT} und $form->{tmpfile} direkt in Systemkommandos. Deswegen muss sichergestellt sein, dass diese Variablen nur mit geprüften Werten gefüllt werden.