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

(-)a/basket/sendbasket.pl (-11 / +8 lines)
Lines 15-22 Link Here
15
# You should have received a copy of the GNU General Public License
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use strict;
18
use Modern::Perl;
19
use warnings;
20
19
21
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
22
use Encode qw(encode);
21
use Encode qw(encode);
Lines 29-35 use C4::Biblio; Link Here
29
use C4::Items;
28
use C4::Items;
30
use C4::Auth;
29
use C4::Auth;
31
use C4::Output;
30
use C4::Output;
32
use C4::Biblio;
31
use C4::Templates ();
33
use Koha::Email;
32
use Koha::Email;
34
33
35
my $query = new CGI;
34
my $query = new CGI;
Lines 53-67 if ( $email_add ) { Link Here
53
    my $email = Koha::Email->new();
52
    my $email = Koha::Email->new();
54
    my %mail = $email->create_message_headers({ to => $email_add });
53
    my %mail = $email->create_message_headers({ to => $email_add });
55
    my $comment    = $query->param('comment');
54
    my $comment    = $query->param('comment');
56
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
55
57
        {
56
    # Since we are already logged in, no need to check credentials again
58
            template_name   => "basket/sendbasket.tt",
57
    # We only need to add OPACBaseURL
59
            query           => $query,
58
    my $template2 = C4::Templates::gettemplate(
60
            type            => "intranet",
59
        'basket/sendbasket.tt', 'intranet', $query,
61
            authnotrequired => 0,
62
            flagsrequired   => { catalogue => 1 },
63
        }
64
    );
60
    );
61
    $template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
65
62
66
    my @bibs = split( /\//, $bib_list );
63
    my @bibs = split( /\//, $bib_list );
67
    my @results;
64
    my @results;
(-)a/opac/opac-sendbasket.pl (-11 / +7 lines)
Lines 17-24 Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use strict;
20
use Modern::Perl;
21
use warnings;
22
21
23
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
24
use Encode qw(encode);
23
use Encode qw(encode);
Lines 31-38 use C4::Biblio; Link Here
31
use C4::Items;
30
use C4::Items;
32
use C4::Auth;
31
use C4::Auth;
33
use C4::Output;
32
use C4::Output;
34
use C4::Biblio;
35
use C4::Members;
33
use C4::Members;
34
use C4::Templates ();
36
use Koha::Email;
35
use Koha::Email;
37
36
38
my $query = new CGI;
37
my $query = new CGI;
Lines 67-80 if ( $email_add ) { Link Here
67
    });
66
    });
68
    $mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress');
67
    $mail{'X-Abuse-Report'} = C4::Context->preference('KohaAdminEmailAddress');
69
68
70
    my ( $template2, $borrowernumber, $cookie ) = get_template_and_user(
69
    # Since we are already logged in, no need to check credentials again
71
        {
70
    # We only need to add OPACBaseURL
72
            template_name   => "opac-sendbasket.tt",
71
    my $template2 = C4::Templates::gettemplate(
73
            query           => $query,
72
        'opac-sendbasket.tt', 'opac', $query,
74
            type            => "opac",
75
            authnotrequired => 0,
76
        }
77
    );
73
    );
74
    $template2->param( OPACBaseURL => C4::Context->preference('OPACBaseURL') );
78
75
79
    my @bibs = split( /\//, $bib_list );
76
    my @bibs = split( /\//, $bib_list );
80
    my @results;
77
    my @results;
81
- 

Return to bug 17109