View | Details | Raw Unified | Return to bug 9530
Collapse All | Expand All

(-)a/opac/opac-sendshelf.pl (-6 / +7 lines)
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 113-119 if ( $email ) { Link Here
113
115
114
    $template2->param(
116
    $template2->param(
115
        BIBLIO_RESULTS => \@results,
117
        BIBLIO_RESULTS => \@results,
116
        email_sender   => $email_from,
118
        email_sender   => $mail{'from'},
117
        comment        => $comment,
119
        comment        => $comment,
118
        shelfname      => $shelf[1],
120
        shelfname      => $shelf[1],
119
        firstname      => $user->{firstname},
121
        firstname      => $user->{firstname},
120
- 

Return to bug 9530