// Performance optimizations

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16024 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-06-14 14:11:11 +00:00
parent 3e46c466a8
commit b2b29c4270
14 changed files with 98 additions and 93 deletions
+1 -2
View File
@@ -963,8 +963,7 @@ class ToolsCore
// Remove all non-whitelist chars.
$str = preg_replace('/[^a-zA-Z0-9\s\'\:\/\[\]-\pL]/u', '', $str);
$str = preg_replace('/[\s\'\:\/\[\]-]+/', ' ', $str);
$str = preg_replace('/[ ]/', '-', $str);
$str = preg_replace('/[\/]/', '-', $str);
$str = str_replace(array(' ', '/'), '-', $str);
// If it was not possible to lowercase the string with mb_strtolower, we do it after the transformations.
// This way we lose fewer special chars.