From 83e899f8b119b095501ce7e94ea619ff20cdee14 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 25 Jan 2016 20:47:27 +0000 Subject: [PATCH] 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 Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- C4/Languages.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index b9c7e6dce9..c05c31bf9e 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -198,7 +198,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 description'); $sth->execute(); while (my $language_subtag_registry = $sth->fetchrow_hashref) { my $desc; -- 2.39.5