]> git.koha-community.org Git - koha.git/commit
Bug 29697: Remove GetHiddenItemnumbers
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 21 Jan 2022 14:06:54 +0000 (15:06 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Jul 2022 18:24:11 +0000 (15:24 -0300)
commit0a37e8f7fd89d9ea23e0a8649885cca3f9c043f3
tree85e32c50d972d37852df1683d2ebb6ec2f0c4b3d
parent70d61d80fbf48df4d2a3843ea3349ea77de5fbf8
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
JD amended patch:
-    my @items        = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed;
-    foreach my $item (@items) {
+    my $items        = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed;
+    foreach my $item (@$items) {

-    for my $itm (@items) {
+    for my $itm (@$items) {

-    $dat->{ITEM_RESULTS}   = \@items;
+    $dat->{ITEM_RESULTS}   = $items;

-        @items_to_show = Koha::Items->search( { itemnumbers => [ map { $_->{itemnumber} } @all_items ] } )
-                                    ->filter_by_visible_in_opac( { patron => $patron } );
+        @items_to_show = Koha::Items->search( { itemnumber => [ map { $_->{itemnumber} } @all_items ] } )
+                                    ->filter_by_visible_in_opac( { patron => $patron } )->as_list;

-            my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1, patron => $patron });
+            my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1, patron => $patron })->as_list;

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Biblio.pm
C4/Items.pm
C4/Search.pm
opac/opac-basket.pl
opac/opac-detail.pl
opac/opac-search.pl
opac/opac-tags.pl
t/db_dependent/Items.t