[-] BO : fixed bug with Search:indexation when editing product (id_shop was missing)

// end of line style fix


git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9441 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mMarinetti committed 2011-10-19 09:29:00 +00:00
1 parent 8aa35a9196
commit ab1594fb7e
1 file changed
+3 -2
+3 -2
View File
@@ -342,7 +342,7 @@ class SearchCore
// Adjust the limit to get only "whole" products, in every languages (and at least one) // Adjust the limit to get only "whole" products, in every languages (and at least one)
$limit = max(1, round($limit / $nbLanguages) * $nbLanguages); $limit = max(1, round($limit / $nbLanguages) * $nbLanguages);
return Db::getInstance()->executeS(' return Db::getInstance()->executeS('
SELECT p.id_product, pl.id_lang, pl.name pname, p.reference, p.ean13, p.upc, pl.description_short, pl.description, cl.name cname, m.name mname SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc, pl.description_short, pl.description, cl.name cname, m.name mname
FROM '._DB_PREFIX_.'product p FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = p.id_category_default AND pl.id_lang = cl.id_lang) LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = p.id_category_default AND pl.id_lang = cl.id_lang)
@@ -462,7 +462,8 @@ class SearchCore
$existingWords = $db->executeS(' $existingWords = $db->executeS('
SELECT DISTINCT word FROM '._DB_PREFIX_.'search_word SELECT DISTINCT word FROM '._DB_PREFIX_.'search_word
WHERE word IN ('.implode(',', $queryArray2).') WHERE word IN ('.implode(',', $queryArray2).')
AND id_lang = '.(int)$product['id_lang']); AND id_lang = '.(int)$product['id_lang'].'
AND id_shop = '.(int)$product['id_shop']);
foreach($existingWords as $data) foreach($existingWords as $data)
unset($queryArray[Tools::replaceAccentedChars($data['word'])]); unset($queryArray[Tools::replaceAccentedChars($data['word'])]);