[koha-commits] main Koha release repository branch 3.14.x updated. v3.14.09-35-g2b58ea2
Git repo owner
gitmaster at git.koha-community.org
Wed Aug 6 10:27:39 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, 3.14.x has been updated
via 2b58ea23227bd0539942cdffa4f51b5f86cddf50 (commit)
from 38c4ad601bea09ec3b01587b417b88deadcc38c6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2b58ea23227bd0539942cdffa4f51b5f86cddf50
Author: Jonathan Druart <jonathan.druart at biblibre.com>
Date: Wed Mar 19 16:38:20 2014 +0100
Bug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed
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 at hotmail.com>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
(cherry picked from commit 9132f9befb36f32fc35a511c3829c224b42893bf)
Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>
-----------------------------------------------------------------------
Summary of changes:
C4/Circulation.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list