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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2025-04-17 13:05:54 +01:00 committed by Katrin Fischer
parent 35eb1e46e7
commit 7da684a507
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -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 ) );