From 7cf73e6967659fe3ffc4c99ed4403f739ffce1f4 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 25 Mar 2015 18:49:16 +0000 Subject: [PATCH] Sort countries by locale, according to user's language and country settings, using already existing method to determine locale --- phpgwapi/inc/class.country.inc.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.country.inc.php b/phpgwapi/inc/class.country.inc.php index 6c909ce86b..b40df1d9dc 100755 --- a/phpgwapi/inc/class.country.inc.php +++ b/phpgwapi/inc/class.country.inc.php @@ -459,13 +459,12 @@ class country if(class_exists('Collator') && class_exists('Locale')) { - $col = new \Collator($GLOBALS['egw_info']['user']['preferences']['common']['lang'].'_'. - $GLOBALS['egw_info']['user']['preferences']['common']['country']); + $col = new \Collator(common::setlocale()); $col->asort($this->countries_translated); } else { - asort($this->countries_translated); + natcasesort($this->countries_translated); } } }