Bugzilla – Attachment 8315 Details for
Bug 7751
Decrease loan period on items with a high number of holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7751 : Fix a couple of comparisons in C4::Circulation
Bug-7751--Fix-a-couple-of-comparisons-in-C4Circula.patch (text/plain), 1.72 KB, created by
Chris Cormack
on 2012-03-19 21:23:14 UTC
(
hide
)
Description:
Bug 7751 : Fix a couple of comparisons in C4::Circulation
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-03-19 21:23:14 UTC
Size:
1.72 KB
patch
obsolete
>From e0819c677e3687bff51d9f7701bbe58da582f756 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 23 Jun 2011 12:10:51 +0100 >Subject: [PATCH] Bug 7751 : Fix a couple of comparisons in C4::Circulation > >Changed a string comparison called on an integer >Deal with case where value is not set without runtime warnings > >This is dependent on bug 5549 >--- > C4/Circulation.pm | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 6ee6331..417b05b 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -783,7 +783,7 @@ sub CanBookBeIssued { > # > my ($current_loan_count, $max_loans_allowed) = TooMany( $borrower, $item->{biblionumber}, $item ); > # if TooMany max_loans_allowed returns 0 the user doesn't have permission to check out this book >- if ($max_loans_allowed eq 0) { >+ if (defined $max_loans_allowed && $max_loans_allowed == 0) { > $needsconfirmation{PATRON_CANT} = 1; > } else { > if($max_loans_allowed){ >@@ -915,11 +915,12 @@ sub CanBookBeIssued { > } > > ## check for high holds decreasing loan period >- if (C4::Context->preference("decreaseLoanHighHolds") == 1) >+ my $decrease_loan = C4::Context->preference('decreaseLoanHighHolds'); >+ if ($decrease_loan && $decrease_loan == 1) > { > my ($reserved,$num,$duration,$returndate)=checkHighHolds($item,$borrower); > #print "reserved: $reserved\n".Dumper($num); >- if ($num>=C4::Context->preference("decreaseLoanHighHoldsValue")) >+ if ($num >= C4::Context->preference("decreaseLoanHighHoldsValue")) > { > $needsconfirmation{HIGHHOLDS} = 1; > $needsconfirmation{'num_holds'} = $num; >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7751
:
8313
|
8314
|
8315
|
9801
|
9803
|
9804
|
9810
|
9811
|
9812
|
9834
|
10040
|
10199
|
10204
|
11477
|
11672
|
11676
|
12337
|
12345
|
12528
|
12643
|
12786
|
12787
|
12802
|
12803