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

(-)a/opac/opac-reserve.pl (-8 / +6 lines)
Lines 73-78 for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { Link Here
73
73
74
my $patron = Koha::Patrons->find( $borrowernumber, { prefetch => ['categorycode'] } );
74
my $patron = Koha::Patrons->find( $borrowernumber, { prefetch => ['categorycode'] } );
75
my $category = $patron->category;
75
my $category = $patron->category;
76
# no OpacHiddenItems rules used if category is excepted
77
my $item_hide_rules =
78
    ( $category->override_hidden_items )
79
    ? {}
80
    : get_yaml_pref_hash('OpacHiddenItems');
76
81
77
my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup');
82
my $can_place_hold_if_available_at_pickup = C4::Context->preference('OPACHoldsIfAvailableAtPickup');
78
unless ( $can_place_hold_if_available_at_pickup ) {
83
unless ( $can_place_hold_if_available_at_pickup ) {
Lines 463-475 foreach my $biblioNum (@biblionumbers) { Link Here
463
    my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
468
    my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode });
464
    my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs };
469
    my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs };
465
470
466
    # no OpacHiddenItems rules used if category is excepted
471
    my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $item_hide_rules } ) };
467
    my $rules =
468
        ( $category->override_hidden_items )
469
      ? {}
470
      : get_yaml_pref_hash('OpacHiddenItems');
471
472
    my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { rules => $rules } ) };
473
472
474
    # Only keep the items that are visible in the opac (i.e. those in %visible_items)
473
    # Only keep the items that are visible in the opac (i.e. those in %visible_items)
475
    # FIXME: We should get rid of itemInfos altogether and use $visible_items
474
    # FIXME: We should get rid of itemInfos altogether and use $visible_items
476
- 

Return to bug 15448