[Koha-patches] [PATCH 78/92] Fixing bug with CanBookBeReserved ... rules for default borrower codes were being ignored
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Tue Dec 22 01:21:11 CET 2009
From: Chris Cormack <chrisc at catalyst.net.nz>
---
C4/Reserves.pm | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/C4/Reserves.pm b/C4/Reserves.pm
index 031ca32..d98b838 100644
--- a/C4/Reserves.pm
+++ b/C4/Reserves.pm
@@ -352,7 +352,7 @@ sub CanBookBeReserved{
my @args;
my $rightsquery = "SELECT categorycode, itemtype, branchcode, reservesallowed
FROM issuingrules
- WHERE categorycode = ?";
+ WHERE categorycode IN (?, '*')";
push @args,$borrower->{categorycode};
if($controlbranch eq "ItemHomeLibrary"){
@@ -370,7 +370,6 @@ sub CanBookBeReserved{
}
$rightsquery .= " ORDER BY categorycode DESC, itemtype DESC, branchcode DESC";
-
my $sthrights = $dbh->prepare($rightsquery);
$sthrights->execute(@args);
@@ -405,7 +404,6 @@ sub CanBookBeReserved{
if(my $row = $sthcount->fetchrow_hashref()){
$reservescount = $row->{count};
}
-
if($reservescount < $reservesrights){
return 1;
}else{
--
1.6.3.3
More information about the Koha-patches
mailing list