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

(-)a/opac/opac-ISBDdetail.pl (-1 / +1 lines)
Lines 94-100 if (scalar @items >= 1) { Link Here
94
94
95
        # we need to fetch the borrower info here, so we can pass the category
95
        # we need to fetch the borrower info here, so we can pass the category
96
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
96
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
97
        $borcat = $borrower->categorycode;
97
        $borcat = $borrower ? $borrower->categorycode : q{};
98
    }
98
    }
99
99
100
    my @hiddenitems = GetHiddenItemnumbers( { items => \@items, borcat => $borcat });
100
    my @hiddenitems = GetHiddenItemnumbers( { items => \@items, borcat => $borcat });
(-)a/opac/opac-MARCdetail.pl (-1 / +1 lines)
Lines 91-97 if (scalar @all_items >= 1) { Link Here
91
91
92
        # we need to fetch the borrower info here, so we can pass the category
92
        # we need to fetch the borrower info here, so we can pass the category
93
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
93
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
94
        $borcat = $borrower->categorycode;
94
        $borcat = $borrower ? $borrower->categorycode : q{};
95
    }
95
    }
96
    push @items2hide, GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat });
96
    push @items2hide, GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat });
97
97
(-)a/opac/opac-detail.pl (-1 / +1 lines)
Lines 87-93 if ( scalar @all_items >= 1 ) { Link Here
87
87
88
        # we need to fetch the borrower info here, so we can pass the category
88
        # we need to fetch the borrower info here, so we can pass the category
89
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
89
        my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
90
        $borcat = $borrower->categorycode;
90
        $borcat = $borrower ? $borrower->categorycode : q{};
91
    }
91
    }
92
92
93
    push @hiddenitems,
93
    push @hiddenitems,
(-)a/opac/opac-search.pl (-2 / +1 lines)
Lines 633-639 $search_context->{'interface'} = 'opac'; Link Here
633
if (C4::Context->preference('OpacHiddenItemsExceptions')){
633
if (C4::Context->preference('OpacHiddenItemsExceptions')){
634
    # we need to fetch the borrower info here, so we can pass the category
634
    # we need to fetch the borrower info here, so we can pass the category
635
    my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
635
    my $borrower = Koha::Patrons->find( { borrowernumber => $borrowernumber } );
636
    $search_context->{'category'} = $borrower->categorycode;
636
    $search_context->{'category'} = $borrower ? $borrower->categorycode : q{};
637
}
637
}
638
638
639
for (my $i=0;$i<@servers;$i++) {
639
for (my $i=0;$i<@servers;$i++) {
640
- 

Return to bug 14385