Lines 137-143
my $upc = GetNormalizedUPC($record,$marcflavour);
Link Here
|
137 |
my $ean = GetNormalizedEAN($record,$marcflavour); |
137 |
my $ean = GetNormalizedEAN($record,$marcflavour); |
138 |
my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); |
138 |
my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); |
139 |
my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); |
139 |
my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); |
140 |
|
|
|
141 |
$template->param( |
140 |
$template->param( |
142 |
normalized_upc => $upc, |
141 |
normalized_upc => $upc, |
143 |
normalized_ean => $ean, |
142 |
normalized_ean => $ean, |
Lines 145-156
$template->param(
Link Here
|
145 |
normalized_isbn => $isbn, |
144 |
normalized_isbn => $isbn, |
146 |
); |
145 |
); |
147 |
|
146 |
|
148 |
my $marcnotesarray = $biblio->get_marc_notes({ marcflavour => $marcflavour }); |
147 |
my $marcnotesarray = eval { $biblio->get_marc_notes({ marcflavour => $marcflavour }) }; |
149 |
|
|
|
150 |
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } }; |
148 |
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } }; |
151 |
|
149 |
|
152 |
my $dbh = C4::Context->dbh; |
150 |
my $dbh = C4::Context->dbh; |
153 |
|
|
|
154 |
my @all_items = GetItemsInfo( $biblionumber ); |
151 |
my @all_items = GetItemsInfo( $biblionumber ); |
155 |
my @items; |
152 |
my @items; |
156 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
153 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
Lines 167-172
if (@hostitems){
Link Here
|
167 |
push (@items,@hostitems); |
164 |
push (@items,@hostitems); |
168 |
} |
165 |
} |
169 |
|
166 |
|
|
|
167 |
|
170 |
my $dat = &GetBiblioData($biblionumber); |
168 |
my $dat = &GetBiblioData($biblionumber); |
171 |
|
169 |
|
172 |
#coping with subscriptions |
170 |
#coping with subscriptions |
Lines 199-205
foreach my $subscription (@subscriptions) {
Link Here
|
199 |
my $showcomp = C4::Context->preference('ShowComponentRecords'); |
197 |
my $showcomp = C4::Context->preference('ShowComponentRecords'); |
200 |
my $show_analytics; |
198 |
my $show_analytics; |
201 |
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { |
199 |
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) { |
202 |
if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) { |
200 |
if ( my $components = eval {$biblio->get_marc_components(C4::Context->preference('MaxComponentRecords'))} ) { |
203 |
$show_analytics = 1 if @{$components}; # just show link when having results |
201 |
$show_analytics = 1 if @{$components}; # just show link when having results |
204 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
202 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
205 |
my $parts; |
203 |
my $parts; |
Lines 221-227
if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
Link Here
|
221 |
$template->param( ComponentPartsQuery => $biblio->get_components_query ); |
219 |
$template->param( ComponentPartsQuery => $biblio->get_components_query ); |
222 |
} |
220 |
} |
223 |
} else { # check if we should show analytics anyway |
221 |
} else { # check if we should show analytics anyway |
224 |
$show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not |
222 |
$show_analytics = 1 if eval{ @{$biblio->get_marc_components(1)} }; # count matters here, results does not |
225 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
223 |
$template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages}; |
226 |
} |
224 |
} |
227 |
|
225 |
|
228 |
- |
|
|