[Koha-patches] [PATCH] bug 3164: fix OPAC holds in SingleBranchMode

Galen Charlton gmcharlt at gmail.com
Sun Oct 17 19:18:52 CEST 2010


Account for case where no branch is explicitly supplied.

Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 opac/opac-reserve.pl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index d5d39db..699179b 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -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.
-- 
1.7.0



More information about the Koha-patches mailing list