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

(-)a/opac/opac-detail.pl (-3 / +24 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 $dbh = C4::Context->dbh;
77
my $sth = $dbh->prepare("SELECT * FROM items WHERE biblionumber=?;");
78
$sth->execute($biblionumber);
79
80
my @itemsmatchingbiblionumber;
81
my $matchingitem = $sth->fetchrow_hashref;
82
while ($matchingitem) {
83
    push @itemsmatchingbiblionumber,$matchingitem;
84
    $matchingitem = $sth->fetchrow_hashref;
85
}
86
87
my @items2hide;
88
if ($#itemsmatchingbiblionumber >= 0) {
89
    @items2hide =GetHiddenItemnumbers(@itemsmatchingbiblionumber);
90
}
91
92
# only hide if there are hidden items. $#items2hide=-1 for no items.
93
if ($#items2hide==$#itemsmatchingbiblionumber && $#items2hide>=0) {
94
    # biblionumber=0 effectively hides the biblio record
95
    # since there is no such biblionumber.
96
    $biblionumber = 0;
97
}
98
76
my $record       = GetMarcBiblio($biblionumber);
99
my $record       = GetMarcBiblio($biblionumber);
77
if ( ! $record ) {
100
if ( ! $record ) {
78
    print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
101
    print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
Lines 628-634 if (scalar(@itemloop) >= 50 && !$viewallitems) { Link Here
628
}
651
}
629
652
630
## get notes and subjects from MARC record
653
## get notes and subjects from MARC record
631
my $dbh              = C4::Context->dbh;
632
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
654
my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
633
my $marcisbnsarray   = GetMarcISBN    ($record,$marcflavour);
655
my $marcisbnsarray   = GetMarcISBN    ($record,$marcflavour);
634
my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour);
656
my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour);
635
- 

Return to bug 10584