[Koha-patches] [Signed Off] [PATCH] Bug 6137: fix a Circulation bug. userenv null
Chris Cormack
chrisc at catalyst.net.nz
Tue May 17 00:24:33 CEST 2011
From: biblibre <dev_patches at biblibre.com>
Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
C4/Circulation.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 9a2db4c..3713e49 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -1923,8 +1923,8 @@ sub _GetCircControlBranch {
my $circcontrol = C4::Context->preference('CircControl');
my $branch;
- if ($circcontrol eq 'PickupLibrary') {
- $branch= C4::Context->userenv->{'branch'} if C4::Context->userenv;
+ if ($circcontrol eq 'PickupLibrary' and (C4::Context->userenv and C4::Context->userenv->{'branch'}) ) {
+ $branch= C4::Context->userenv->{'branch'};
} elsif ($circcontrol eq 'PatronLibrary') {
$branch=$borrower->{branchcode};
} else {
--
1.7.4.1
More information about the Koha-patches
mailing list