Bug 8997

Summary: Dead code in C4/Language causing useless SQL queries
Product: Koha Reporter: Paul Poulain <paul.poulain>
Component: Architecture, internals, and plumbingAssignee: Paul Poulain <paul.poulain>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: major    
Priority: P5 - low CC: chris, jcamins, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8997: In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it to _build_languages_arrayref, that does nothing of it
Bug 8997: Unnecessary call to getAllLanguages

Description Paul Poulain 2012-10-31 17:21:23 UTC
In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it to _build_languages_arrayref, that does nothing of it

removing this dead code will clean & reduce SQL overhead
Comment 1 Paul Poulain 2012-10-31 17:22:30 UTC Comment hidden (obsolete)
Comment 2 Paul Poulain 2012-10-31 17:23:23 UTC
Test plan:
 * apply patch
 * use Koha (with some languages activated on staff & OPAC)

=> you won't see any differences
(i've tested both Plack & CGI)
Comment 3 Jared Camins-Esakov 2012-11-02 12:26:08 UTC
Created attachment 13209 [details] [review]
Bug 8997: Unnecessary call to getAllLanguages

In C4/Language, getTranslatedLanguages calls getAllLanguage, passes it
to _build_languages_arrayref, that does nothing of it. Removing this
dead code will clean & reduce SQL overhead

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
I tried switching between languages and enabling and disabling
languages, and could not see any change with the patch applied.
Comment 4 Jonathan Druart 2012-11-13 15:21:13 UTC
Good catch Paul.
Marked as Passed QA.
Comment 5 Jared Camins-Esakov 2012-11-20 12:35:07 UTC
This patch has been pushed to master.
Comment 6 Paul Poulain 2012-11-20 15:27:56 UTC
Patch pushed to branch 3.10.x
Comment 7 Chris Cormack 2013-04-23 09:51:50 UTC
Released in 3.10.0