// MERGE with 1.4 r7770

This commit is contained in:
rMalie
2011-07-28 09:20:57 +00:00
parent 60b07cacb9
commit c17e7c236d
968 changed files with 26082 additions and 3937 deletions
+10 -3
View File
@@ -330,10 +330,13 @@ class SearchCore
return $features;
}
public static function indexation($full = false)
public static function indexation($full = false, $id_product = false)
{
$db = Db::getInstance();
$dropIndex = false;
if ($id_product)
$full = false;
if ($full)
{
@@ -344,7 +347,11 @@ class SearchCore
}
else
{
$products = $db->ExecuteS('SELECT id_product FROM '._DB_PREFIX_.'product WHERE indexed = 0');
// Do it even if you already know the product id on order to be sure that it exists
$products = $db->ExecuteS('
SELECT id_product
FROM '._DB_PREFIX_.'product
WHERE '.($id_product ? 'id_product = '.(int)$id_product : 'indexed = 0'));
$ids = array();
if ($products)
@@ -594,4 +601,4 @@ class SearchCore
return Product::getProductsProperties((int)$id_lang, $result);
}
}
}