|
Lines 73-86
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Link Here
|
| 73 |
my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0; |
73 |
my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0; |
| 74 |
$biblionumber = int($biblionumber); |
74 |
$biblionumber = int($biblionumber); |
| 75 |
|
75 |
|
| 76 |
my @itemsmatchingbiblionumber = GetItemsInfo($biblionumber); |
76 |
my @all_items = GetItemsInfo($biblionumber); |
| 77 |
if (scalar @itemsmatchingbiblionumber >= 1) { |
77 |
my @hiddenitems; |
| 78 |
my @items2hide = GetHiddenItemnumbers(@itemsmatchingbiblionumber); |
78 |
if (scalar @all_items >= 1) { |
| 79 |
|
79 |
push @hiddenitems, GetHiddenItemnumbers(@all_items); |
| 80 |
if (scalar @items2hide == scalar @itemsmatchingbiblionumber ) { |
80 |
|
| 81 |
# biblionumber=0 effectively hides the biblio record |
81 |
if (scalar @hiddenitems == scalar @all_items ) { |
| 82 |
# since there is no such biblionumber. |
82 |
print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early |
| 83 |
$biblionumber = 0; |
83 |
exit; |
| 84 |
} |
84 |
} |
| 85 |
} |
85 |
} |
| 86 |
|
86 |
|
|
Lines 408-415
$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
Link Here
|
| 408 |
|
408 |
|
| 409 |
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); |
409 |
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); |
| 410 |
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); |
410 |
$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); |
| 411 |
# change back when ive fixed request.pl |
|
|
| 412 |
my @all_items = GetItemsInfo( $biblionumber ); |
| 413 |
|
411 |
|
| 414 |
# adding items linked via host biblios |
412 |
# adding items linked via host biblios |
| 415 |
|
413 |
|
|
Lines 432-440
foreach my $hostfield ( $record->field($analyticfield)) {
Link Here
|
| 432 |
|
430 |
|
| 433 |
my @items; |
431 |
my @items; |
| 434 |
|
432 |
|
| 435 |
# Getting items to be hidden |
|
|
| 436 |
my @hiddenitems = GetHiddenItemnumbers(@all_items); |
| 437 |
|
| 438 |
# Are there items to hide? |
433 |
# Are there items to hide? |
| 439 |
my $hideitems; |
434 |
my $hideitems; |
| 440 |
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0; |
435 |
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0; |
| 441 |
- |
|
|