// 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:
+12
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user