Bugzilla – Attachment 181063 Details for
Bug 38646
C4::Languages::getLanguages is very unreasonably slow (100+ ms)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38646: (follow-up) Ensure consistent ordering of languages
Bug-38646-follow-up-Ensure-consistent-ordering-of-.patch (text/plain), 1.23 KB, created by
Martin Renvoize (ashimema)
on 2025-04-17 12:08:14 UTC
(
hide
)
Description:
Bug 38646: (follow-up) Ensure consistent ordering of languages
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-04-17 12:08:14 UTC
Size:
1.23 KB
patch
obsolete
>From 0357a9bcd0269b2a3cc5b2367814c8becbb26ae2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Thu, 17 Apr 2025 13:05:54 +0100 >Subject: [PATCH] Bug 38646: (follow-up) Ensure consistent ordering of > languages > >We add an `ORDER BY` clause to the SQL statement to ensure we >consistently order accross databases by the iso code. > >This fixes the failing test on MariaDB as it's default sort order >appears to differ from MySQL for this. > >This also ensure we are consistently ordering which will lead to more >consistent and clear results for end users. > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > C4/Languages.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Languages.pm b/C4/Languages.pm >index 7b1776874df..07b42e9781c 100644 >--- a/C4/Languages.pm >+++ b/C4/Languages.pm >@@ -260,7 +260,9 @@ sub getLanguages { > AND native_language_descriptions.type = 'language' > > WHERE language_subtag_registry.type = 'language' >- ${language_list_cond}" ); >+ ${language_list_cond} >+ >+ ORDER BY language_rfc4646_to_iso639.iso639_2_code ASC" ); > > if ($language_list) { > $sth->execute( $current_language, join ',' => split( /,|\|/, $language_list ) ); >-- >2.49.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38646
:
175262
|
176207
|
176208
|
176227
|
176228
|
176229
|
176231
|
176232
|
176233
|
176234
| 181063