From 153ac4cc181dc2297d27f0acb9e1024fa032ca22 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 --- C4/Languages.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 8042bcdf3f..5550b0fa70 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -199,7 +199,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.11.0