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

(-)a/C4/Reserves.pm (-2 / +2 lines)
Lines 1369-1375 sub IsAvailableForItemLevelRequest { Link Here
1369
1369
1370
    if ( $on_shelf_holds == 1 ) {
1370
    if ( $on_shelf_holds == 1 ) {
1371
        return 1;
1371
        return 1;
1372
    } elsif ( $on_shelf_holds == 2 ) {
1372
    } elsif ( $on_shelf_holds == 2 && $patron) {
1373
1373
1374
        # These calculations work at the biblio level, and can be expensive
1374
        # These calculations work at the biblio level, and can be expensive
1375
        # we use the in-memory cache to avoid calling once per item when looping items on a biblio
1375
        # we use the in-memory cache to avoid calling once per item when looping items on a biblio
Lines 1424-1430 sub ItemsAnyAvailableAndNotRestricted { Link Here
1424
            || Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan
1424
            || Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan
1425
            || $branchitemrule->{holdallowed} eq 'from_home_library' && $param->{patron}->branchcode ne $i->homebranch
1425
            || $branchitemrule->{holdallowed} eq 'from_home_library' && $param->{patron}->branchcode ne $i->homebranch
1426
            || $branchitemrule->{holdallowed} eq 'from_local_hold_group' && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } )
1426
            || $branchitemrule->{holdallowed} eq 'from_local_hold_group' && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } )
1427
            || CanItemBeReserved( $param->{patron}, $i )->{status} ne 'OK';
1427
            || $param->{patron} && CanItemBeReserved( $param->{patron}, $i )->{status} ne 'OK';
1428
    }
1428
    }
1429
1429
1430
    return 0;
1430
    return 0;
(-)a/opac/opac-detail.pl (-7 / +1 lines)
Lines 682-693 else { Link Here
682
        $item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding;
682
        $item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding;
683
        $item_info->{home_library_info} = $opac_info_home->content if $opac_info_home;
683
        $item_info->{home_library_info} = $opac_info_home->content if $opac_info_home;
684
684
685
        if ( $patron ) {
685
        $has_reservable_items = $has_reservable_items || IsAvailableForItemLevelRequest ( $item, $patron, undef );
686
            $has_reservable_items = IsAvailableForItemLevelRequest($item, $patron, undef);
687
        } else {
688
            $has_reservable_items =
689
                Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => undef } );
690
        }
691
686
692
        # get collection code description, too
687
        # get collection code description, too
693
        my $ccode = $item->ccode;
688
        my $ccode = $item->ccode;
694
- 

Return to bug 34886