Merge correction recherche

This commit is contained in:
Michael RICOIS 2012-03-26 09:38:04 +00:00
parent adf2299c84
commit 8d6bc5e081

View File

@ -313,22 +313,25 @@ class RechercheController extends Zend_Controller_Action
$listParams = array('siret', 'actNomRs', 'cpVille', 'pays', 'cpVille', 'pctMin', 'pctMax');
break;
}
$nbField = count($listParams);
foreach($listParams as $key){
if(!empty($params[$key])){
$params[$key] = strip_tags($params[$key]);
$nbField--;
}
}
if ($nbField!=0){
$this->_forward($action, 'recherche');
}
$rechercheParams = new RechercheHistorique();
//Si le formulaire a été soumis alors on enregistre en session et on redirige
if ( !empty($type) ) {
//Vérification si au moins un champs a été saisie
$nbField = count($listParams);
foreach($listParams as $key){
if(!empty($params[$key])){
$params[$key] = strip_tags($params[$key]);
} else {
$nbField--;
}
}
if ($nbField==0){
$this->_redirect('/recherche/'.$action);
}
//Redirection
$token = $rechercheParams->save($type, $params);
$this->_redirect('recherche/liste/token/'.$token);
}