// copy of bugfix #PSCFI-4956 from 1.4 (search alias)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14484 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-04-05 12:33:28 +00:00
parent b9fb2187b3
commit 0a1be37069
+12 -3
View File
@@ -123,9 +123,18 @@ class SearchCore
if (!$indexation)
{
$alias = new Alias(null, $string);
if (Validate::isLoadedObject($alias))
$string = $alias->search;
$words = explode(' ', $string);
$processed_words = array();
// search for aliases for each word of the query
foreach ($words as $word)
{
$alias = new Alias(null, $word);
if (Validate::isLoadedObject($alias))
$processed_words[] = $alias->search;
else
$processed_words[] = $word;
}
$string = implode(' ', $processed_words);
}
if ($indexation)