// Merge -> revision 8342

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8344 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-05 14:56:02 +00:00
parent 371f9a5397
commit 79fd72e461
46 changed files with 1299 additions and 249 deletions
+10 -2
View File
@@ -32,10 +32,17 @@ class MRTools
{
static public function replaceAccentedCharacters($string)
{
if (function_exists('iconv'))
{
$currentLocale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL, 'en_US.UTF8');
$cleanedString = iconv('UTF-8','ASCII//TRANSLIT', $string);
setLocale(LC_ALL, $currentLocale);
}
else
$cleanedString = strtr($string,
'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ',
'aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
return $cleanedString;
}
@@ -48,8 +55,9 @@ class MRTools
FROM `'._DB_PREFIX_.'country`
WHERE `id_country` = '.(int)$id_country);
// Skip the cheking format if doesn't exist
if (!$zipcodeFormat)
return false;
return true;
$regxMask = str_replace(
array('N', 'C', 'L'),
@@ -64,4 +72,4 @@ class MRTools
}
}
?>
?>