[-] Core: Fix search indexation when nb languages * nb shops > 50

This commit is contained in:
Rémi Gaillard
2013-03-14 14:16:31 +01:00
parent 2bb4c6c08a
commit 3e8e0fe7a4
+1 -1
View File
@@ -382,7 +382,7 @@ class SearchCore
{
// Adjust the limit to get only "whole" products, in every languages (and at least one)
$max_possibilities = $total_languages * count(Shop::getShops(true));
$limit = max(1, floor($limit / $max_possibilities) * $max_possibilities);
$limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities);
return Db::getInstance()->executeS('
SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc,