Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 289 → Rev 290

/trunk/interfaces/controleurs/Consultation.php
34,7 → 34,8
$this->definirCommeModulePrincipal(get_class($this));
$this->construireMenu($this->referentiel);
$this->construireFilAriane($this->referentiel);
$this->executerActionReferentiel('Recherche', 'chargerMoteurRecherche', $this->referentiel, 20);
$_GET['recherche'] = "#";
$this->executerActionReferentiel('Recherche', 'rechercher', $this->referentiel, 20);
}
/trunk/services/modules/Recherche.php
402,10 → 402,12
// Suppression des slash
$valeur = stripslashes($valeur);
// Utilisation d'une recherche de chaîne exacte
// Utilisation d'une recherche de chaîne
if (preg_match('/^"(.*)"$/', $valeur, $match)) {
$valeur = '%'.$match[1].'%';
} else {
} elseif ($valeur == "#") {
$valeur = 1;
}else{
// Recherche de mots non liés
$mots = explode(' ', $valeur);
$valeur = '%'.implode ('%', $mots).'%';
463,6 → 465,9
// Construire where en fonction des paramêtres
if (isset($p['mots'])) {
if ($p['mots'] == "#") {
$where .= "1";
} else {
$where .= 'AND ('.
" num_nom LIKE {$p['mots']} ".
" OR num_nom_retenu LIKE {$p['mots']} ".
499,6 → 504,7
" OR statut_introduction LIKE {$p['mots']} ".
" OR statut_culture LIKE {$p['mots']} ".
') ';
}
}
if (isset($p['sg'])) {
$where .= "AND nom_supra_generique LIKE {$p['sg']} ";