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.
---
 opac/opac-addbybiblionumber.pl |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl
index d72b7c0..ace334e 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 (
-- 
1.5.5.GIT

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to