Bugzilla – Attachment 113034 Details for
Bug 26132
Improve readability of TooMany
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26132: continuing code golf
Bug-26132-continuing-code-golf.patch (text/plain), 1.60 KB, created by
Jonathan Druart
on 2020-11-05 08:21:14 UTC
(
hide
)
Description:
Bug 26132: continuing code golf
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-05 08:21:14 UTC
Size:
1.60 KB
patch
obsolete
>From 19e848ba0efeb44a10786d13b4e6e945188b674c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 5 Nov 2020 09:21:01 +0100 >Subject: [PATCH] Bug 26132: continuing code golf > >--- > C4/Circulation.pm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index bc77eba6cd..8e35de271e 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -451,18 +451,16 @@ sub TooMany { > > my $checkouts; > my $where = {}; >- my $attr = { prefetch => 'item' }; >+ my $attr = { join => 'item' }; > if ( $maxissueqty_rule->branchcode ) { > if ( C4::Context->preference('CircControl') eq 'PickupLibrary' ) { > $where = { 'me.branchcode' => $maxissueqty_rule->branchcode }; >- } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') { >- # if branch is the patron's home branch, then count all loans by patron >- } else { >+ } elsif (C4::Context->preference('CircControl') ne 'PatronLibrary') { > $where = { 'item.homebranch' => $maxissueqty_rule->branchcode }; > } >- } else { >- # if rule is not branch specific then count all loans by patron >- } >+ # elsif branch is the patron's home branch, then count all loans by patron >+ } # elsif rule is not branch specific then count all loans by patron >+ > $checkouts = $patron->checkouts->search( $where, $attr ); > my $sum_checkouts; > my $rule_itemtype = $maxissueqty_rule->itemtype; >-- >2.20.1
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 26132
:
107734
|
107735
|
107736
|
107737
|
107738
|
107796
|
107797
|
107798
|
107799
|
107800
|
107801
|
108147
|
108148
|
108149
|
108150
|
108151
|
108152
|
108153
|
113006
|
113007
|
113014
| 113034