Main Koha release repository
https://koha-community.org
9132f9befb
C4::Circulation::CanBookBeRenewed called C4::Members::GetMemberDetails to retrieve categorycode and branchcode. - categorycode is used to retrieve the issuing rule - the borrower information is passed to C4::Circulation::_GetCircControlBranch. Which only uses the branchcode parameter. GetMemberDetails does a lot of calls/queries (patronflags, account, etc.) that are not needed by CanBookBeRenewed. This patch replaces it with a call to C4::Members::GetMember. Note: I presented this small optimisation during a quick introduction to NYTProf (hackfest 14 in Marseille). Test plan: - launch member unit tests - check the code Checking the code resulted in the following: CanBookBeRenewed builds a hash reference from the borrowernumber (2482). Note it is only used in this function and not passed in. _GetCircControlBranch (2485) requires that hashreference to have a branchcode key. As stated above. The following line (2486) requires it have a categorycode key. As such, C4::Members::GetMemberDetails is confirmed to be overkill, and C4::Members::GetMember is sufficient. Testing Done ------------ 0) Back up DB 1) Make sure MPL is in the list of libraries. 2) Apply the patch. 3) run the koha qa test tool 4) prove -v t/db_dependent/Circulation.t Patch applies cleanly. QA Test tool was all OK. All tests ran successfully. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
||
---|---|---|
acqui | ||
admin | ||
authorities | ||
basket | ||
C4 | ||
catalogue | ||
cataloguing | ||
circ | ||
course_reserves | ||
debian | ||
docs | ||
errors | ||
etc | ||
install_misc | ||
installer | ||
Koha | ||
koha-tmpl | ||
labels | ||
members | ||
misc | ||
offline_circ | ||
opac | ||
OpenILS | ||
patron_lists | ||
patroncards | ||
plugins | ||
reports | ||
reserve | ||
reviews | ||
rotating_collections | ||
selenium | ||
serials | ||
services | ||
skel | ||
sms | ||
suggestion | ||
svc | ||
t | ||
tags | ||
test | ||
tmp/modified_authorities | ||
tools | ||
virtualshelves | ||
xt | ||
.htaccess | ||
.mailmap | ||
about.pl | ||
changelanguage.pl | ||
edithelp.pl | ||
fix-perl-path.PL | ||
help.pl | ||
INSTALL | ||
install-CPAN.pl | ||
INSTALL.debian | ||
INSTALL.fedora7 | ||
INSTALL.opensuse | ||
INSTALL.ubuntu | ||
koha_perl_deps.pl | ||
kohaversion.pl | ||
LICENSE | ||
mainpage.pl | ||
Makefile.PL | ||
MANIFEST.SKIP | ||
README | ||
README.robots | ||
rewrite-config.PL |
Koha is a free software integrated library system. Koha is distributed under the GNU GPL version 3 or later. Please read the file LICENSE for more details. To install or upgrade Koha, please see the INSTALL file appropriate to your platform. Report bugs at http://bugs.koha-community.org/ Visit the Koha Project website at http://www.koha-community.org/