]> git.koha-community.org Git - koha.git/commit
Bug 16441: Do not use a package variable to cache C4::Letters::getletter
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 May 2016 18:43:43 +0000 (19:43 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Thu, 16 Jun 2016 08:38:42 +0000 (10:38 +0200)
commit799ac3cb869adc134bd1aa420fc99a79b335ad24
tree5cedaaa1cef9cb99df4d40e77168e330defc09d8
parentbf40e2b333dd4705983686d60e4c7dd4c83c4a2e
Bug 16441: Do not use a package variable to cache C4::Letters::getletter

C4::Letters::getletter use a package variable (%letter) to cache letter
returned by the subroutine.
I have not found any direct issues caused by that but it is safer to
remove it.
It won't be a big deal to hit the DBMS to get a valid letter when
needed.

No test plan here, just confirm that the changes make sense.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that performance loss is just a millisecond or so per
subsequent call of getletter.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c4f388f64966f2202e9f3e3c16dad5cef3dbe0ac)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit c63dccba27842ce92569625a03df55085bf5681a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Letters.pm