X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=basket%2Fsendbasket.pl;h=3f57de2d14d1df0540248fc24ae7b48afa1a533c;hb=c4c5496ec656ee4745587b3cea239cc849d2c09a;hp=107a7377dae41b6aae66afa8b84457434d505c56;hpb=2ea6fdec156419fbbdd5f64da927d0b2b45e751c;p=koha.git diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl index 107a7377da..3f57de2d14 100755 --- a/basket/sendbasket.pl +++ b/basket/sendbasket.pl @@ -80,7 +80,7 @@ if ( $email_add ) { my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); - my @items = &GetItemsInfo( $biblionumber, 'opac' ); + my @items = GetItemsInfo( $biblionumber ); my $hasauthors = 0; if($dat->{'author'} || @$marcauthorsarray) { @@ -112,22 +112,28 @@ if ( $email_add ) { my $body; # Analysing information and getting mail properties - if ( $template_res =~ /\n(.*)\n/s ) { - $mail{'subject'} = $1; + if ( $template_res =~ /(.*)/s ) { + $mail{subject} = $1; + $mail{subject} =~ s|\n?(.*)\n?|$1|; } else { $mail{'subject'} = "no subject"; } my $email_header = ""; - if ( $template_res =~ /
\n(.*)\n/s ) { + if ( $template_res =~ /
(.*)/s ) { $email_header = $1; + $email_header =~ s|\n?(.*)\n?|$1|; } my $email_file = "basket.txt"; - if ( $template_res =~ /\n(.*)\n/s ) { + if ( $template_res =~ /(.*)/s ) { $email_file = $1; + $email_file =~ s|\n?(.*)\n?|$1|; } - if ( $template_res =~ /\n(.*)\n/s ) { $body = encode_qp($1); } + if ( $template_res =~ /(.*)/s ) { + $body = encode_qp($1); + $body =~ s|\n?(.*)\n?|$1|; + } my $boundary = "====" . time() . "====";