Merge correction recherche
This commit is contained in:
parent
adf2299c84
commit
8d6bc5e081
@ -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) ) {
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user