Subversion Repositories eFlore/Applications.del

Compare Revisions

No changes between revisions

Ignore whitespace Rev 2031 → Rev 2032

/branches/v1.8-fluor/services/bibliotheque/Sql.php
282,9 → 282,7
$this->addWhere('masque.date', $dateWhere);
}
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
294,9 → 292,7
$deptMotif = $this->bdd->proteger("INSEE-C:$dept");
$this->addWhere('masque.departement', "do.ce_zone_geo LIKE $deptMotif");
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
312,9 → 308,7
$pays = implode(',', $this->bdd->proteger($pays));
$this->addWhere('masque.pays', "do.pays IN ($pays)");
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
322,9 → 316,8
if (isset($this->parametres['masque.id_zone_geo'])) {
$idZgMotif = $this->bdd->proteger($this->parametres['masque.id_zone_geo']);
$this->addWhere('masque.id_zone_geo', "do.ce_zone_geo = $idZgMotif");
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
334,9 → 327,7
$genreMotif = $this->bdd->proteger("$genre%");
$this->addWhere('masque.genre', "do.nom_sel LIKE $genreMotif");
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
345,9 → 336,7
$familleMotif = $this->bdd->proteger($this->parametres['masque.famille']);
$this->addWhere('masque.famille', "do.famille = $familleMotif");
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
356,10 → 345,8
$ns = $this->parametres['masque.ns'];
$nsMotif = $this->bdd->proteger("$ns%");
$this->addWhere('masque.ns', "do.nom_sel LIKE $nsMotif");
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
369,9 → 356,7
$nnWhere = sprintf($sqlTpl, $this->parametres['masque.nn']);
$this->addWhere('masque.nn', $nnWhere);
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
381,9 → 366,7
$refMotif = $this->bdd->proteger("$ref%");
$this->addWhere('masque.referentiel', "do.nom_referentiel LIKE $refMotif");
 
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
$this->ajouterJoinObsSiNecessaire();
}
}
 
393,10 → 376,14
$communeMotif = $this->bdd->proteger("$commune%");
$this->addWhere('masque.commune', "do.zone_geo LIKE $communeMotif");
 
$this->ajouterJoinObsSiNecessaire();
}
}
private function ajouterJoinObsSiNecessaire() {
if ($this->etreAppliImg()) {
$this->addJoin('LEFT JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
$this->addJoin('INNER JOIN del_observation AS do ON (di.ce_observation = do.id_observation) ');
}
}
}
 
public function ajouterConstrainteAppliObs() {
Property changes:
Added: svn:mergeinfo
Merged /branches/v1.7-oxygene/services/bibliotheque/Sql.php:r2003,2006-2007,2009-2010
Merged /branches/v1.3-beryllium/services/bibliotheque/Sql.php:r1753,1758
Merged /branches/v1.6-azote/services/bibliotheque/Sql.php:r1988
Merged /trunk/services/bibliotheque/Sql.php:r2029,2031
Merged /branches/v1.2-lithium/services/bibliotheque/Sql.php:r1676
Merged /branches/v1.5-carbone/services/bibliotheque/Sql.php:r1893-1921,1942
Merged /branches/v1.0-hydrogene/services/bibliotheque/Sql.php:r1507