From 69bb98da022a43fb623fac27ce88724dd7b4b7c9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 25 Jan 2016 20:47:27 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 15067 - Follow up to fix sorting It looks like C4::Languages:getLanguages relies on implicit database order for languages. They appear to be sorted by subtag so this patch adds that sorting to the database query to ensure the dropdown is sorted. Signed-off-by: Aleisha --- C4/Languages.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 384fd7a..b49a7f3 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -212,7 +212,7 @@ sub getLanguages { if ($lang) { $current_language = regex_lang_subtags($lang)->{'language'}; } - my $sth = $dbh->prepare('SELECT * FROM language_subtag_registry WHERE type=\'language\''); + my $sth = $dbh->prepare('SELECT * FROM language_subtag_registry WHERE type=\'language\' ORDER BY subtag'); $sth->execute(); while (my $language_subtag_registry = $sth->fetchrow_hashref) { my $desc; -- 1.7.10.4