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

(-)a/opac/opac-MARCdetail.pl (-12 / +13 lines)
Lines 91-99 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
91
91
92
my $patron = Koha::Patrons->find($loggedinuser);
92
my $patron = Koha::Patrons->find($loggedinuser);
93
my $biblio = Koha::Biblios->find($biblionumber);
93
my $biblio = Koha::Biblios->find($biblionumber);
94
94
if ( !$biblio ) {
95
my $record = $biblio ? $biblio->metadata->record : undef;
96
if ( ! $record ) {
97
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
95
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
98
    exit;
96
    exit;
99
}
97
}
Lines 113-127 my $items = $biblio->items->filter_by_visible_in_opac({ patron => $patron }); Link Here
113
my $framework = $biblio ? $biblio->frameworkcode : q{};
111
my $framework = $biblio ? $biblio->frameworkcode : q{};
114
my $tagslib   = &GetMarcStructure( 0, $framework );
112
my $tagslib   = &GetMarcStructure( 0, $framework );
115
113
116
my $record_processor = Koha::RecordProcessor->new({
114
my $record = $biblio
117
    filters => [ 'EmbedItems', 'ViewPolicy' ],
115
    ? $biblio->metadata_record(
118
    options => {
116
    {
119
        interface     => 'opac',
117
        embed_items => 1,
120
        frameworkcode => $framework,
118
        opac        => 1,
121
        items         => [ $items->as_list ],
119
        patron      => $patron,
122
    }
120
    }
123
});
121
    )
124
$record_processor->process($record);
122
    : undef;
123
if ( !$record ) {
124
    print $query->redirect("/cgi-bin/koha/errors/404.pl");
125
    exit;
126
}
125
127
126
# get biblionumbers stored in the cart
128
# get biblionumbers stored in the cart
127
if(my $cart_list = $query->cookie("bib_list")){
129
if(my $cart_list = $query->cookie("bib_list")){
128
- 

Return to bug 31224