282,11 → 282,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteDepartement() { |
if (isset($this->parametres['masque.departement'])) { |
294,11 → 292,9 |
$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(); |
} |
} |
} |
|
private function ajouterContraintePays() { |
if (isset($this->parametres['masque.pays'])) { |
312,21 → 308,18 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteIdZoneGeo() { |
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(); |
} |
} |
} |
|
private function ajouterContrainteGenre() { |
if (isset($this->parametres['masque.genre'])) { |
334,11 → 327,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteFamille() { |
if (isset($this->parametres['masque.famille'])) { |
345,11 → 336,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteNs() { |
if (isset($this->parametres['masque.ns'])) { |
357,11 → 346,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteNn() { |
if (isset($this->parametres['masque.nn'])) { |
369,11 → 356,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteReferentiel() { |
if (isset($this->parametres['masque.referentiel'])) { |
381,11 → 366,9 |
$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(); |
} |
} |
} |
|
private function ajouterContrainteCommune() { |
if (isset($this->parametres['masque.commune'])) { |
393,11 → 376,15 |
$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() { |
$this->ajouterContrainteTagCel(); |
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 |