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 <galen.charlton@liblime.com>
This commit is contained in:
Allen Reinmeyer 2008-12-03 12:10:50 -06:00 committed by Galen Charlton
parent fd45d76e6b
commit 5f7b2432e4
1 changed files with 8 additions and 12 deletions

View File

@ -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 (