https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24975
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #149954|0 |1 is obsolete| | Attachment #149956|0 |1 is obsolete| | Attachment #149957|0 |1 is obsolete| | --- Comment #114 from Jonathan Druart <[email protected]> --- Created attachment 150015 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150015&action=edit Bug 24975: Simplify and uniform calls to get the translation This patch add a caching mecanism for ItemType objects. We are also caching the result of the image location and the translation key so that we can retrieve from the cache and pass them to the temmplate. We should avoid call to db_t in the controller scripts, and prefer to pass the itemtype object and let the template does what it needs (retrieve the translated description, display the image) Note that the new Koha::Template::Plugin::ItemTypes->GetSorted should certainly be used in other places, for instance in * catalogue/search.pl sub prepare_adv_search_types * opac/opac-search.pl but those 2 occurrences are tricky and we would like to prevent regressions (as much as possible...) A major change is the modification of the prototype of search_compat, I am not sure this patch is updating all the template when the result of the search is passed. Note that Koha::SearchEngine::Elasticsearch::Search could use Koha::ItemTypes->get_from_cache, and certainly other places as well(?) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
