Bugzilla – Attachment 92534 Details for
Bug 23530
Opac-basket.pl script accidentally displays 'hidden' items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items
Bug-23530---Opac-basketpl-script-accidentally-disp.patch (text/plain), 1.60 KB, created by
Mason James
on 2019-09-03 04:09:18 UTC
(
hide
)
Description:
Bug 23530 - Opac-basket.pl script accidentally displays 'hidden' items
Filename:
MIME Type:
Creator:
Mason James
Created:
2019-09-03 04:09:18 UTC
Size:
1.60 KB
patch
obsolete
>From 2df1d46f4451f3e46a73171b121590960b8214e5 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Tue, 3 Sep 2019 16:02:32 +1200 >Subject: [PATCH] Bug 23530 - Opac-basket.pl script accidentally displays > 'hidden' items >Content-Type: text/plain; charset="utf-8" > >to test patch.. > >- prep a test bib with hidden and other items > >- add bib to cart > observe that hidden items are displayed - non-hidden items are hidden > >- apply patch, reload page > observe that hidden items are hidden, non-hidden items are displayed >--- > opac/opac-basket.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl >index c2d57f2..12ded02 100755 >--- a/opac/opac-basket.pl >+++ b/opac/opac-basket.pl >@@ -18,7 +18,6 @@ > use Modern::Perl; > > use CGI qw ( -utf8 ); >-use List::Util qw/none/; # well just one :) > > use C4::Koha; > use C4::Biblio; >@@ -100,12 +99,14 @@ foreach my $biblionumber ( @bibs ) { > # copy the visible ones into the items array. > my @items; > foreach my $item (@all_items) { >- if ( none { $item->{itemnumber} ne $_ } @hidden_items ) { >+ >+ # next if item is hidden >+ next if grep { $item->{itemnumber} eq $_ } @hidden_items ; >+ > my $reserve_status = C4::Reserves::GetReserveStatus($item->{itemnumber}); > if( $reserve_status eq "Waiting"){ $item->{'waiting'} = 1; } > if( $reserve_status eq "Reserved"){ $item->{'onhold'} = 1; } > push @items, $item; >- } > } > > my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23530
:
92534
|
92535
|
92536
|
92537
|
92546