Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 703 → Rev 704

/trunk/services/modules/0.1/del/Images.php
42,8 → 42,8
private $total; // Le nombre total d'images
private $masque = array(); //Enregistrer les paramètres du masque
private $imageIds = array();
private $idImage;
/**
* Méthode principale de la classe
* Lance la récupération des images dans la base et les place dans un objet ResultatService
52,6 → 52,11
* @param $parametres les paramètres situés après le ? dans l'url
* */
public function consulter($ressources, $parametres) {
if (!empty($ressources)) {
$this->idImage = $ressources[0];
}
// Gestion des configuration du script
// TODO : gérer les erreurs de config
// TODO : voir la classe Conteneur
110,24 → 115,28
* */
private function chargerClauseWhere() {
$where = array();
if (isset($this->idImage)) {
$where[] = " id_image = ".$this->getBdd()->proteger($this->idImage);
}
if (isset($this->masque['famille'])) {
$where[] = " famille = '".$this->masque['famille']."' ";
$where[] = " famille = ".$this->getBdd()->proteger($this->masque['famille']);
}
if (isset($this->masque['genre'])) {
$where[] = " genre = '".$this->masque['genre']."' ";
$where[] = " genre = ".$this->getBdd()->proteger($this->masque['genre']);
}
if (isset($this->masque['espece'])) {
$where[] = " nom_sel = '".$this->masque['espece']."' ";
$where[] = " nom_sel = ".$this->getBdd()->proteger($this->masque['espece']);
}
if (isset($this->masque['ns'])) {
$where[] = " nom_sel = '".$this->masque['ns']."' ";
$where[] = " nom_sel = ".$this->getBdd()->proteger($this->masque['ns']);
}
if (isset($this->masque['nn'])) {
$where[] = " nom_sel_nn = '".$this->masque['nn']."' ";
$where[] = " nom_sel_nn = ".$this->getBdd()->proteger($this->masque['nn']);
}
if (isset($this->masque['auteur'])) {
134,7 → 143,7
$auteurId = $this->masque['auteur'];
if (is_numeric($auteurId)) {
$where[] = " ce_utilisateur = ".$this->masque['auteur']." ";
$where[] = " ce_utilisateur = ".$this->masque['auteur'];
} else {
if (strpos($auteurId, '@') === false) {
174,7 → 183,7
}
if (isset($this->masque['tag'])) {
$where[] = " mots_cles_texte = '".$this->masque['tag']."' ";
$where[] = " mots_cles_texte LIKE ".$this->getBdd()->proteger($this->masque['tag']);
}
if (!empty($where)) {