]> git.koha-community.org Git - koha.git/commit
Bug 15344: Remove unucessary call to GetMemberDetails
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 9 Dec 2015 17:00:10 +0000 (17:00 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 31 Dec 2015 09:29:11 +0000 (10:29 +0100)
commit44202df6acdfcfb371eccc6b8e8007a871304e49
treebc18694cd01d8f54bf543f7fecd7865888c25ff3
parentdbd07c4d089ca32d385c0f044bfb6a85ae547706
Bug 15344: Remove unucessary call to GetMemberDetails

This subroutine does a lot a processing and should only be called when
necessary.
In the get_template_and_user subroutine (so called from any pages of
Koha), it is call to pass the branchcode, title, firstname, surname and
borrowernumber values for the logged in user.
This subroutine calls GetMemberAccountRecords which retrieve the items
infos for all accountlines entries of the logged in user.
On members/members.pl, let's say you have 74 entries in the accountlines
tables, the page will execute 115 SELECT instead of 35 if you don't have any
accountlines entries.
With this patch, the number of SELECT is always 31.

To test this patch you should have technical skills to know what to do.

Note that USER_INFO was an array of... 1 element. Now it's a hashref.

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ac541e0fa1c11254e110d94eed64c358e02e8aab)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
12 files changed:
C4/Auth.pm
admin/aqbudgets.pl
admin/aqplan.pl
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt