From bfd2d7ada2725e810a4485bbf5f3b08253cf03d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Aug 2013 20:06:56 +0200 Subject: [PATCH] Fix: Sort order works with special chars. --- htdocs/core/class/html.form.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5019b2dba02..bef2f1465af 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -473,7 +473,7 @@ class Form $sql = "SELECT rowid, code as code_iso, libelle as label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; $sql.= " WHERE active = 1"; - $sql.= " ORDER BY code ASC"; + //$sql.= " ORDER BY code ASC"; dol_syslog(get_class($this)."::select_country sql=".$sql); $resql=$this->db->query($sql); @@ -492,7 +492,7 @@ class Form $countryArray[$i]['rowid'] = $obj->rowid; $countryArray[$i]['code_iso'] = $obj->code_iso; $countryArray[$i]['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country".$obj->code_iso)!="Country".$obj->code_iso?$langs->transnoentitiesnoconv("Country".$obj->code_iso):($obj->label!='-'?$obj->label:'')); - $label[$i] = $countryArray[$i]['label']; + $label[$i] = dol_string_unaccent($countryArray[$i]['label']); $i++; } @@ -507,7 +507,7 @@ class Form $out.= '