@@ -, +, @@ --- opac/opac-sendbasket.pl | 22 ++++++---------------- 1 files changed, 6 insertions(+), 16 deletions(-) --- a/opac/opac-sendbasket.pl +++ a/opac/opac-sendbasket.pl @@ -124,27 +124,17 @@ if ( $email_add ) { # Getting template result my $template_res = $template2->output(); - my $body; # Analysing information and getting mail properties - if ( $template_res =~ /\n(.*)\n?/s ) { - $mail{'subject'} = $1; - } - else { $mail{'subject'} = "no subject"; } + $mail{subject} = $template_res =~ /\n(.*)\n?/s + ? $1 : "no subject"; - my $email_header = ""; - if ( $template_res =~ /
\n(.*)\n?/s ) { - $email_header = encode_qp($1); - } + my ($email_header) = $template_res =~ /
\n(.*)\n?/s; - my $email_file = "basket.txt"; - if ( $template_res =~ /\n(.*)\n?/s ) { - $email_file = $1; - } + my $email_file = $template_res =~ /\n(.*)\n?/s + ? $1 : "basket.txt"; - if ( $template_res =~ /\n(.*)\n?/s ) { - $body = encode_qp($1); - } + my ($body) = $template_res =~ /\n(.*)\n?/s; my $boundary = "====" . time() . "===="; --