Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 974b5d86

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 974b5d8664caba8cebfccc55b1be53a09916a200
  • Vorgänger ebacee0a
  • Nachfolger d5b09512

Filehandles lokal deklarieren. Kosmetik. In Mailer.pm open() nur mit festgelegtem Argument aufrufen.

Unterschiede anzeigen:

SL/Form.pm
$main::lxdebug->enter_sub();
my ($self, $myconfig, $userspath) = @_;
my $template;
my ($template, $out);
local (*IN, *OUT);
$self->{"cwd"} = getcwd();
$self->{"tmpdir"} = $self->{cwd} . "/${userspath}";
......
# for postscript we store a copy in a temporary file
my $fileid = time;
$self->{tmpfile} ||= "$userspath/${fileid}.$self->{IN}";
if ($template->uses_temp_file() || $self->{media} eq 'email') {
$out = $self->{OUT};
$self->{OUT} = ">$self->{tmpfile}";
......
}
my $err = $mail->send($out);
my $err = $mail->send();
$self->error($self->cleanup . "$err") if ($err);
} else {
SL/Mailer.pm
sub send {
$main::lxdebug->enter_sub();
my ($self, $out) = @_;
my ($self) = @_;
local (*IN, *OUT);
my $boundary = time;
$boundary = "LxOffice-$self->{version}-$boundary";
......
$self->{charset} = Common::DEFAULT_CHARSET unless $self->{charset};
if ($out) {
if (!open(OUT, $out)) {
$main::lxdebug->leave_sub();
return "$out : $!";
}
} else {
if (!open(OUT, ">-")) {
$main::lxdebug->leave_sub();
return "STDOUT : $!";
}
if (!open(OUT, $main::sendmail)) {
$main::lxdebug->leave_sub();
return "$main::sendmail : $!";
}
$self->{contenttype} = "text/plain" unless $self->{contenttype};
bin/mozilla/io.pl
$form->{subject} = qq|$form->{label} $form->{"${inv}number"}|
unless $form->{subject};
$form->{OUT} = "$sendmail";
$form->{emailed} .= " $form->{formname}";
$form->{emailed} =~ s/^ //;
}

Auch abrufbar als: Unified diff