Lines 46-61
my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
Link Here
|
46 |
|
46 |
|
47 |
my $bib_list = $query->param('bib_list'); |
47 |
my $bib_list = $query->param('bib_list'); |
48 |
my $email_add = $query->param('email_add'); |
48 |
my $email_add = $query->param('email_add'); |
49 |
my $email_sender = $query->param('email_sender'); |
|
|
50 |
|
49 |
|
51 |
my $dbh = C4::Context->dbh; |
50 |
my $dbh = C4::Context->dbh; |
52 |
|
51 |
|
53 |
if ( $email_add ) { |
52 |
if ( $email_add ) { |
54 |
my $email_from = C4::Context->preference('KohaAdminEmailAddress'); |
53 |
my $email_from = C4::Context->preference('KohaAdminEmailAddress'); |
55 |
my $comment = $query->param('comment'); |
54 |
my $user = GetMember( borrowernumber => $borrowernumber ); |
56 |
my %mail = ( |
55 |
my $sender_email |
57 |
To => $email_add, |
56 |
= C4::Context->preference('OpacSendReplyTo') |
58 |
From => $email_from |
57 |
? GetPreferredEmailAddress($user) || $email_from |
|
|
58 |
: $email_from; |
59 |
my $comment = $query->param('comment'); |
60 |
my %mail = ( |
61 |
To => $email_add, |
62 |
From => $email_from, |
63 |
'Reply-To' => $sender_email, |
59 |
); |
64 |
); |
60 |
|
65 |
|
61 |
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( |
66 |
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( |
Lines 87-93
if ( $email_add ) {
Link Here
|
87 |
if($dat->{'author'} || @$marcauthorsarray) { |
92 |
if($dat->{'author'} || @$marcauthorsarray) { |
88 |
$hasauthors = 1; |
93 |
$hasauthors = 1; |
89 |
} |
94 |
} |
90 |
|
|
|
91 |
|
95 |
|
92 |
$dat->{MARCNOTES} = $marcnotesarray; |
96 |
$dat->{MARCNOTES} = $marcnotesarray; |
93 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
97 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
Lines 102-113
if ( $email_add ) {
Link Here
|
102 |
} |
106 |
} |
103 |
|
107 |
|
104 |
my $resultsarray = \@results; |
108 |
my $resultsarray = \@results; |
105 |
|
109 |
|
106 |
my $user = GetMember(borrowernumber => $borrowernumber); |
|
|
107 |
|
108 |
$template2->param( |
110 |
$template2->param( |
109 |
BIBLIO_RESULTS => $resultsarray, |
111 |
BIBLIO_RESULTS => $resultsarray, |
110 |
email_sender => $email_sender, |
|
|
111 |
comment => $comment, |
112 |
comment => $comment, |
112 |
firstname => $user->{firstname}, |
113 |
firstname => $user->{firstname}, |
113 |
surname => $user->{surname}, |
114 |
surname => $user->{surname}, |