Summary: | Function getLanguages is called unnecessarily for search result pages | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Searching | Assignee: | David Cook <dcook> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | minor | ||
Priority: | P5 - low | CC: | david, jonathan.druart, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16734 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38646 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes OPAC and staff interface searching so that language option functions (C4::Languages::getLanguages) are only used on the advanced search pages and not the search result pages, where the output is not used.
This should also help improve performance - this might be minor on a quiet system, but it could have an impact on a busier system (and reduces unnecessary database calls).
|
Version(s) released in: |
25.05.00
|
Circulation function: | |||
Attachments: |
Bug 38846: Only call getLanguages for advanced search pages
Bug 38846: Only call getLanguages for advanced search pages |
Description
David Cook
2025-01-08 00:11:53 UTC
Created attachment 176213 [details] [review] Bug 38846: Only call getLanguages for advanced search pages This change makes it so that C4::Languages::getLanguages is only called for the advanced search pages and not the search result pages where the output is not used. Test plan: 0. Apply the patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?expanded_options=1 2. Note that the "Language" and "Language of original" dropdowns appear with language options 3. Go to the following http://localhost:8081/cgi-bin/koha/catalogue/search.pl?advsearch=1 &idx=kw&q=test&sort_by=relevance 4. Note that the page loads normally 5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?expanded_options=1 6. Note that the "Language" dropdown appears with language options 7. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 8. Note that the page loads normally Created attachment 176236 [details] [review] Bug 38846: Only call getLanguages for advanced search pages This change makes it so that C4::Languages::getLanguages is only called for the advanced search pages and not the search result pages where the output is not used. Test plan: 0. Apply the patch and koha-plack --restart kohadev 1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?expanded_options=1 2. Note that the "Language" and "Language of original" dropdowns appear with language options 3. Go to the following http://localhost:8081/cgi-bin/koha/catalogue/search.pl?advsearch=1 &idx=kw&q=test&sort_by=relevance 4. Note that the page loads normally 5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?expanded_options=1 6. Note that the "Language" dropdown appears with language options 7. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 8. Note that the page loads normally Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed for 25.05! Well done everyone, thank you! |