Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3600 → Rev 3601

/trunk/jrest/services/CelWidgetMapPoint.php
35,6 → 35,8
const MARQUEUR_GROUPE = 'GROUPE';
const MARQUEUR_COMMUNE = 'COMMUNE';
const MARQUEUR_STATION = 'STATION';
private $standard = "AND donnees_standard = 1";
/**
* Méthode appelée avec une requête de type GET.
*/
45,6 → 47,9
}
extract($this->parametres);
//Chronometre::chrono("Avant groupage");
if (isset($this->parametres['standard']) && $this->parametres['standard'] = 0) {
$this->standard = "";
}
 
$action = array_shift($ressources);
if (isset($action)) {
114,6 → 119,7
' LEFT JOIN cel_zones_geo AS zg '.
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
"WHERE transmission = '1' ".
$this->standard.
" AND (".
$this->construireWhereRectangleStationOR()." OR ".
$this->construireWhereRectangleCommuneOR().") ".
154,6 → 160,7
' LEFT JOIN cel_zones_geo AS zg '.
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
"WHERE transmission = '1' ".
$this->standard.
" AND (".
$this->construireWhereRectangleStationOR()." OR ".
$this->construireWhereRectangleCommuneOR().") ".
346,6 → 353,7
' LEFT JOIN cel_zones_geo AS zg '.
" ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) ".
"WHERE transmission = '1' ".
$this->standard.
(($this->communeEstDemandee()) ? $this->construireWhereCommuneSansCoordonneesAvecSensibles() : $this->construireWhereCoordonneesSansSensibles()).
$this->construireWhereDept().
$this->construireWherePays().
494,6 → 502,7
' LEFT JOIN cel_zones_geo AS zg '.
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
"WHERE transmission = '1' ".
$this->standard.
" AND nom_ret != '' ".
$this->construireWhereDept().
$this->construireWhereCommune().
575,7 → 584,7
$sql = " AND (latitude LIKE $lat AND longitude LIKE $lng) ";
}
}
$sql .= ' AND (mots_cles_texte IS NULL OR mots_cles_texte NOT LIKE "%sensible%" ) ';
$sql .= ' AND (localite_floutage IS NULL OR localite_floutage = "précise" ) ';
return $sql;
}
 
754,7 → 763,8
'FROM cel_export_total AS co '.
' LEFT JOIN cel_zones_geo AS zg '.
' ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) '.
"WHERE co.transmission = '1' and co.images != null".
"WHERE co.transmission = '1' and co.images != null".
$this->standard.
($type == 'date.creation' ? " AND co.date_creation LIKE $param " : '').
($type == 'commentaire.obs' ? " AND co.commentaire LIKE $param " : '').
($type == 'commentaire.*' ? " AND co.commentaire LIKE $param " : '').
1143,6 → 1153,7
' LEFT JOIN cel_zones_geo AS zg '.
" ON (zg.nom = co.zone_geo AND zg.id_zone_geo = co.ce_zone_geo) ".
"WHERE co.transmission = '1' ".
$this->standard.
$this->construireWhereCoordonnees().
$this->construireWhereUtilisateur().
$this->construireWhereNumTaxon().