Lines 27-33
use Try::Tiny qw( catch try );
Link Here
|
27 |
use C4::Biblio qw( |
27 |
use C4::Biblio qw( |
28 |
GetMarcSubjects |
28 |
GetMarcSubjects |
29 |
); |
29 |
); |
30 |
use C4::Items qw( GetItemsInfo ); |
|
|
31 |
use C4::Auth qw( get_template_and_user ); |
30 |
use C4::Auth qw( get_template_and_user ); |
32 |
use C4::Output qw( output_html_with_http_headers ); |
31 |
use C4::Output qw( output_html_with_http_headers ); |
33 |
use C4::Templates; |
32 |
use C4::Templates; |
Lines 49-56
my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
Link Here
|
49 |
my $bib_list = $query->param('bib_list') || ''; |
48 |
my $bib_list = $query->param('bib_list') || ''; |
50 |
my $email_add = $query->param('email_add'); |
49 |
my $email_add = $query->param('email_add'); |
51 |
|
50 |
|
52 |
my $dbh = C4::Context->dbh; |
|
|
53 |
|
54 |
if ( $email_add ) { |
51 |
if ( $email_add ) { |
55 |
die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ |
52 |
die "Wrong CSRF token" unless Koha::Token->new->check_csrf({ |
56 |
session_id => scalar $query->cookie('CGISESSID'), |
53 |
session_id => scalar $query->cookie('CGISESSID'), |
Lines 88-106
if ( $email_add ) {
Link Here
|
88 |
my $marcauthorsarray = $biblio->get_marc_authors; |
85 |
my $marcauthorsarray = $biblio->get_marc_authors; |
89 |
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); |
86 |
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); |
90 |
|
87 |
|
91 |
my @items = GetItemsInfo( $biblionumber ); |
88 |
my $items = $biblio->items->filter_by_visible_in_opac({ patron => $patron }); |
92 |
|
89 |
|
93 |
my $hasauthors = 0; |
90 |
my $hasauthors = 0; |
94 |
if($dat->{'author'} || @$marcauthorsarray) { |
91 |
if($dat->{'author'} || @$marcauthorsarray) { |
95 |
$hasauthors = 1; |
92 |
$hasauthors = 1; |
96 |
} |
93 |
} |
97 |
|
|
|
98 |
|
94 |
|
99 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
95 |
$dat->{MARCSUBJCTS} = $marcsubjctsarray; |
100 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |
96 |
$dat->{MARCAUTHORS} = $marcauthorsarray; |
101 |
$dat->{HASAUTHORS} = $hasauthors; |
97 |
$dat->{HASAUTHORS} = $hasauthors; |
102 |
$dat->{'biblionumber'} = $biblionumber; |
98 |
$dat->{'biblionumber'} = $biblionumber; |
103 |
$dat->{ITEM_RESULTS} = \@items; |
99 |
$dat->{ITEM_RESULTS} = $items; |
104 |
|
100 |
|
105 |
$iso2709 .= $record->as_usmarc(); |
101 |
$iso2709 .= $record->as_usmarc(); |
106 |
|
102 |
|