From f8b0a443db76488ffbc8c4c64fa610978010d4fb Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 6 Oct 2008 15:18:17 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSaddon=20::=20suppan=20:=20Correction=20de?= =?UTF-8?q?=20la=20m=C3=A9thode=20replaceAccents()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/conf/config.LSaddons.php | 1 + trunk/includes/addons/LSaddons.supann.php | 58 +++++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/trunk/conf/config.LSaddons.php b/trunk/conf/config.LSaddons.php index a161c6a3..29b83dd1 100644 --- a/trunk/conf/config.LSaddons.php +++ b/trunk/conf/config.LSaddons.php @@ -24,6 +24,7 @@ $GLOBALS['LSaddons']['loads'] = array ( 'samba', 'posix', 'ftp', + 'supann', 'maildir' ); diff --git a/trunk/includes/addons/LSaddons.supann.php b/trunk/includes/addons/LSaddons.supann.php index 2c6487e2..52877af2 100644 --- a/trunk/includes/addons/LSaddons.supann.php +++ b/trunk/includes/addons/LSaddons.supann.php @@ -131,9 +131,59 @@ * @retval string La chaine sans les accents */ function replaceAccents($string){ - return strtr($string, 'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ', - 'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); + $replaceAccent = Array( + "à" => "a", + "á" => "a", + "â" => "a", + "ã" => "a", + "ä" => "a", + "ç" => "c", + "è" => "e", + "é" => "e", + "ê" => "e", + "ë" => "e", + "ì" => "i", + "í" => "i", + "î" => "i", + "ï" => "i", + "ñ" => "n", + "ò" => "o", + "ó" => "o", + "ô" => "o", + "õ" => "o", + "ö" => "o", + "ù" => "u", + "ú" => "u", + "û" => "u", + "ü" => "u", + "ý" => "y", + "ÿ" => "y", + "À" => "A", + "Á" => "A", + "Â" => "A", + "Ã" => "A", + "Ä" => "A", + "Ç" => "C", + "È" => "E", + "É" => "E", + "Ê" => "E", + "Ë" => "E", + "Ì" => "I", + "Í" => "I", + "Î" => "I", + "Ï" => "I", + "Ñ" => "N", + "Ò" => "O", + "Ó" => "O", + "Ô" => "O", + "Õ" => "O", + "Ö" => "O", + "Ù" => "U", + "Ú" => "U", + "Û" => "U", + "Ü" => "U", + "Ý" => "Y" + ); + return strtr($string, $replaceAccent); } - - ?>