From 5f7b2432e4f22453e82605e804d4e61375aeb993 Mon Sep 17 00:00:00 2001 From: Allen Reinmeyer Date: Wed, 3 Dec 2008 12:10:50 -0600 Subject: [PATCH] Bug 2675 users public lists do not show on opac-detail.pl Code change actually occurs in opac-addbybiblionumber.pl accessed via opac-detail.pl. Bug fix allows for users to select the 'save to lists' link and add item to their private, public and all open lists. Previously, only private and open lists were retrieved and listed. Signed-off-by: Galen Charlton --- opac/opac-addbybiblionumber.pl | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl index d72b7c0fc4..ace334ee1a 100755 --- a/opac/opac-addbybiblionumber.pl +++ b/opac/opac-addbybiblionumber.pl @@ -95,21 +95,17 @@ else { ); } else { # offer choice of shelves - # first private shelves... my $limit = 10; - my ($shelflist) = GetRecentShelves(1, $limit, $loggedinuser); my @shelvesloop; my %shelvesloop; - for my $shelf ( @{ $shelflist->[0] } ) { - push( @shelvesloop, $shelf->{shelfnumber} ); - $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname}; - } - # then open shelves... - my ($shelflist) = GetRecentShelves(3, $limit, undef); - for my $shelf ( @{ $shelflist->[0] } ) { - push( @shelvesloop, $shelf->{shelfnumber} ); - $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname}; - } + #grab each type of shelf, open (type 3) should not be limited by user. + foreach my $shelftype (1,2,3) { + my ($shelflist) = GetRecentShelves($shelftype, $limit, $shelftype == 3 ? undef : $loggedinuser); + for my $shelf (@{ $shelflist->[0] }) { + push(@shelvesloop, $shelf->{shelfnumber}); + $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname}; + } + } my $CGIvirtualshelves; if ( @shelvesloop > 0 ) { $CGIvirtualshelves = CGI::scrolling_list ( -- 2.20.1