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

(-)a/opac/opac-detail.pl (-6 / +15 lines)
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 @itemsmatchingbiblionumber = GetItemsInfo($biblionumber);
77
my @hiddenitems;
78
if (scalar @itemsmatchingbiblionumber >= 1) {
79
    push @hiddenitems, GetHiddenItemnumbers(@itemsmatchingbiblionumber);
80
81
    if (scalar @hiddenitems == scalar @itemsmatchingbiblionumber ) {
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") );
411
# FIXME -- Perhaps this 2002 comment no longer applies?
412
#          Bug 10584 just changed the line following it.
400
# change back when ive fixed request.pl
413
# change back when ive fixed request.pl
401
my @all_items = GetItemsInfo( $biblionumber );
414
my @all_items = @itemsmatchingbiblionumber;
402
415
403
# adding items linked via host biblios
416
# adding items linked via host biblios
404
417
Lines 421-429 foreach my $hostfield ( $record->field($analyticfield)) { Link Here
421
434
422
my @items;
435
my @items;
423
436
424
# Getting items to be hidden
425
my @hiddenitems = GetHiddenItemnumbers(@all_items);
426
427
# Are there items to hide?
437
# Are there items to hide?
428
my $hideitems;
438
my $hideitems;
429
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0;
439
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0;
430
- 

Return to bug 10584