Lines 70-78
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
70 |
} |
70 |
} |
71 |
); |
71 |
); |
72 |
|
72 |
|
73 |
my $biblionumber = $query->param('biblionumber') || $query->param('bib'); |
73 |
my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0; |
74 |
$biblionumber = int($biblionumber); |
74 |
$biblionumber = int($biblionumber); |
75 |
|
75 |
|
|
|
76 |
my @all_items = GetItemsInfo($biblionumber); |
77 |
my @hiddenitems; |
78 |
if (scalar @all_items >= 1) { |
79 |
push @hiddenitems, GetHiddenItemnumbers(@all_items); |
80 |
|
81 |
if (scalar @hiddenitems == scalar @all_items ) { |
82 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early |
83 |
exit; |
84 |
} |
85 |
} |
86 |
|
76 |
my $record = GetMarcBiblio($biblionumber); |
87 |
my $record = GetMarcBiblio($biblionumber); |
77 |
if ( ! $record ) { |
88 |
if ( ! $record ) { |
78 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early |
89 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early |
Lines 397-404
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
Link Here
|
397 |
|
408 |
|
398 |
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); |
409 |
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); |
399 |
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); |
410 |
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); |
400 |
# change back when ive fixed request.pl |
|
|
401 |
my @all_items = GetItemsInfo( $biblionumber ); |
402 |
|
411 |
|
403 |
# adding items linked via host biblios |
412 |
# adding items linked via host biblios |
404 |
|
413 |
|
Lines 421-429
foreach my $hostfield ( $record->field($analyticfield)) {
Link Here
|
421 |
|
430 |
|
422 |
my @items; |
431 |
my @items; |
423 |
|
432 |
|
424 |
# Getting items to be hidden |
|
|
425 |
my @hiddenitems = GetHiddenItemnumbers(@all_items); |
426 |
|
427 |
# Are there items to hide? |
433 |
# Are there items to hide? |
428 |
my $hideitems; |
434 |
my $hideitems; |
429 |
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0; |
435 |
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0; |
430 |
- |
|
|