// MERGE with 1.4 r7770

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-28 09:20:57 +00:00
parent df255f66c1
commit a875fecb20
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);
}
}
}