350,6 → 350,15 |
return $sensible; |
} |
|
private function communeEstDemandee() { |
$station_infos = $this->decomposerParametreStation(); |
$commune_demandee = true; |
if($station_infos['type'] == self::MARQUEUR_STATION) { |
$commune_demandee = false; |
} |
return $commune_demandee; |
} |
|
/** |
* Données pour l'affichage des obs d'une station |
*/ |
364,7 → 373,7 |
' LEFT JOIN locations AS l '. |
" ON (l.name = i.location AND l.code = i.id_location) ". |
"WHERE transmission = '1' ". |
((!$this->etreNull($this->parametres['commune'])) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()). |
$this->construireWhereDept(). |
$this->construireWhereUtilisateur(). |
$this->construireWhereNumTaxon(). |
375,6 → 384,7 |
$this->construireWhereTag(). |
'ORDER BY nom_sel ASC '. |
"LIMIT {$this->start},{$this->limit} "; |
|
$resultats = $this->requeter($requete, self::SQL_RETOUR_COMPLET, self::SQL_MODE_OBJET); |
$requete = 'SELECT FOUND_ROWS()'; |
$total = (int) $this->requeter($requete, self::SQL_RETOUR_COLONNE); |
584,7 → 594,7 |
$sql = " AND (coord_x = $lat AND coord_y = $lng) "; |
} |
} |
$sql .= ' AND mots_cles_texte NOT LIKE "%sensible%" '; |
$sql .= ' AND (mots_cles_texte IS NULL OR mots_cles_texte NOT LIKE "%sensible%" ) '; |
return $sql; |
} |
|