Subversion Repositories eFlore/Applications.coel

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1721 → Rev 1722

/branches/v1.2-mourvedre/jrest/services/CoelRecherche.php
274,7 → 274,7
// TODO: INNER JOIN
if (isset($p['str-d'])) {
$join[] = 'LEFT JOIN coel_meta_liste_valeur cv ON cv.cmlv_id_valeur = cs_ce_truk_pays';
$where[] = 'cv.cmlv_abreviation = "FR"';
$where[] = "cv.cmlv_abreviation IN ('FR', 'RE', 'YT', 'GP', 'MQ', 'GF', 'NC')";
$where[] = sprintf("cs_code_postal REGEXP '^(%s).*'", implode('|', $p['str-d']));
}
 
285,6 → 285,7
}
 
if (isset($p['pays'])) {
if(array_search('FR', $p['pays']) !== FALSE) $p['pays'] = array_merge($p['pays'], array('RE','YT','GP','MQ','GF','NC'));
$join[] = 'LEFT JOIN coel_meta_liste_valeur cv ON cv.cmlv_id_valeur = cs_ce_truk_pays';
$where[] = sprintf('cv.cmlv_abreviation IN ("%s")', implode('","', $p['pays']));
}
/branches/v1.2-mourvedre/jrest/services/CoelValeurListe.php
85,8 → 85,8
'FROM coel_meta_liste_valeur '.
"WHERE cmlv_abreviation LIKE {$p['abreviation']} ".
(isset($p['ceParent']) ? " AND cmlv_ce_parent = {$p['ceParent']} " : '').
"AND cmlv_id_valeur LIKE {$p['idValeur']}".
'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'cmlv_id_valeur ASC').' ';
" AND cmlv_id_valeur LIKE {$p['idValeur']}".
' ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'cmlv_id_valeur ASC').' ';
$requete_compte = $requete;
$requete .= "LIMIT $this->start,$this->limit ";
break;
/branches/v1.2-mourvedre/scripts/modules/communes/Communes.php
54,12 → 54,15
private function recupererStructures() {
$this->bdd->requeter("USE ".Config::get("tables.bdd_nom_coel"));
$requete =
"SELECT cs_id_structure, cs_nom, cs_code_postal, cs_ville ".
"FROM ".Config::get("tables.table_structures_coel")." ".
"WHERE (cs_latitude IS NULL OR cs_latitude='0' OR Length(Trim(cs_latitude)) = 0) ".
"AND (cs_longitude IS NULL OR cs_longitude='0' OR Length(Trim(cs_longitude)) = 0) ".
"AND cs_ce_truk_pays='2654' ORDER BY cs_ville;";
$requete = sprintf(
"SELECT cs_id_structure, cs_nom, cs_code_postal, cs_ville FROM %s"
. " JOIN coel_meta_liste_valeur ON cs_ce_truk_pays = cmlv_id_valeur"
. " WHERE cmlv_abreviation IN ('FR', 'RE', 'YT', 'GP', 'MQ', 'GF', 'NC')"
. " AND (cs_latitude IS NULL OR cs_latitude='0' OR Length(Trim(cs_latitude)) = 0)"
. " AND (cs_longitude IS NULL OR cs_longitude='0' OR Length(Trim(cs_longitude)) = 0)"
. " ORDER BY cs_ville",
Config::get("tables.table_structures_coel"));
 
$this->structures = $this->bdd->recupererTous($requete);
}
221,6 → 224,9
"'{$structure['longitude']}')";
}
}
 
if(!$updates) return;
 
$sql = "INSERT INTO ".Config::get("tables.table_structures_coel")." (cs_id_structure, cs_code_postal, ".
"cs_ville, cs_latitude, cs_longitude) VALUES ".implode(",", $updates)." ".
"ON DUPLICATE KEY UPDATE cs_code_postal=VALUES(cs_code_postal), cs_ville=VALUES(cs_ville), ".
/branches/v1.2-mourvedre/doc/bdd/maj_v1.2.0.sql
4,3 → 4,4
UPDATE coel_structure SET cs_latitude = NULL, cs_longitude = NULL WHERE cs_latitude = "0" AND cs_longitude = "0";
UPDATE coel_structure SET cs_nbre_personne = NULL WHERE cs_nbre_personne = 0;
ALTER TABLE coel_structure_conservation MODIFY csc_mark_collection_commune TINYINT(1) NULL COMMENT 'Les collections botaniques sont-elles conservées avec d\'autres collections dans les mêmes locaux (problèe de conservation en commun) ?';
UPDATE coel_meta_liste_valeur SET cmlv_nom = 'Bretagne' WHERE cmlv_id_valeur = 4046;
/branches/v1.2-mourvedre/doc/bdd
Property changes:
Modified: svn:mergeinfo
Merged /trunk/doc/bdd:r1714-1721
/branches/v1.2-mourvedre/.
Property changes:
Modified: svn:mergeinfo
Merged /trunk:r1720-1721