Lines 33-38
use C4::Items;
Link Here
|
33 |
use C4::Output; |
33 |
use C4::Output; |
34 |
use C4::VirtualShelves; |
34 |
use C4::VirtualShelves; |
35 |
use C4::Members; |
35 |
use C4::Members; |
|
|
36 |
use Koha::Email; |
36 |
|
37 |
|
37 |
my $query = new CGI; |
38 |
my $query = new CGI; |
38 |
|
39 |
|
Lines 54-65
my $dbh = C4::Context->dbh;
Link Here
|
54 |
if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $shelfid, 'view' ) ) { |
55 |
if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $shelfid, 'view' ) ) { |
55 |
|
56 |
|
56 |
if ( $email ) { |
57 |
if ( $email ) { |
57 |
my $email_from = C4::Context->preference('KohaAdminEmailAddress'); |
58 |
my $message = Koha::Email->new(); |
58 |
my $comment = $query->param('comment'); |
59 |
my $comment = $query->param('comment'); |
59 |
|
60 |
|
60 |
my %mail = ( |
61 |
my %mail = $message->create_message_headers( |
61 |
To => $email, |
62 |
{ |
62 |
From => $email_from |
63 |
to => $email, |
|
|
64 |
} |
63 |
); |
65 |
); |
64 |
|
66 |
|
65 |
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( |
67 |
my ( $template2, $borrowernumber, $cookie ) = get_template_and_user( |
Lines 109-115
if ( $email ) {
Link Here
|
109 |
|
111 |
|
110 |
$template2->param( |
112 |
$template2->param( |
111 |
BIBLIO_RESULTS => \@results, |
113 |
BIBLIO_RESULTS => \@results, |
112 |
email_sender => $email_from, |
114 |
email_sender => $mail{'from'}, |
113 |
comment => $comment, |
115 |
comment => $comment, |
114 |
shelfname => $shelf[1], |
116 |
shelfname => $shelf[1], |
115 |
firstname => $user->{firstname}, |
117 |
firstname => $user->{firstname}, |
116 |
- |
|
|