Correction rapiditer de la prévisualisation

This commit is contained in:
Damien LASSERRE 2012-04-13 12:37:55 +00:00
parent b62d3189e9
commit 0610903073

View File

@ -83,19 +83,18 @@ Class Ciblage
} else
return (array());
}
public function execute($need = false, $limit = false)
public function execute($need = false, $limitD = false)
{
//echo $this->alpha;
if($need) {
$return = array();
$limit = 0;
do {
$this->sphinx->SetLimits($limit, 1000, 50000);
$this->sphinx->SetLimits($limit, (($limitD!=false)?10:1000), 50000);
$resSphinx = $this->sphinx->Query($this->alpha, $this->index);
if(is_array($resSphinx))
$return = array_merge($return, $this->getSiret($resSphinx));
$limit = $limit + 1000;
}while($limit < (($limitD)?$limitD:$resSphinx['total_found']));
}while($limit < (($limitD!=false)?10:$resSphinx['total_found']));
return ($return);
} else
$resSphinx = $this->sphinx->Query($this->alpha, $this->index);