bug 3164: fix OPAC holds in SingleBranchMode
authorGalen Charlton <gmcharlt@gmail.com>
Sun, 17 Oct 2010 17:17:06 +0000 (13:17 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Sun, 17 Oct 2010 17:17:06 +0000 (13:17 -0400)
Account for case where no branch is explicitly supplied.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
opac/opac-reserve.pl

index d5d39db..699179b 100755 (executable)
@@ -158,7 +158,8 @@ if ( $query->param('place_reserve') ) {
         $selectedItems = "$bib/$item/$branch/";
     }
 
-    my @selectedItems = split /\//, $selectedItems;
+    $selectedItems =~ s!/$!!;
+    my @selectedItems = split /\//, $selectedItems, -1;
 
     # Make sure there is a biblionum/itemnum/branch triplet for each item.
     # The itemnum can be 'any', meaning next available.