Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 563 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 563 Rev 641
Line 127... Line 127...
127
		}
127
		}
128
		if (is_numeric($id)) {
128
		if (is_numeric($id)) {
129
			$this->requete_condition[] = 'c.id ='.$this->getBdd()->proteger($id);
129
			$this->requete_condition[] = 'c.id ='.$this->getBdd()->proteger($id);
130
		} else {
130
		} else {
131
			$id = explode('bdtfx.nn:', $id);
131
			$id = explode('bdtfx.nn:', $id);
132
			if (is_numeric($id[1])) {
132
			if (isset($id[1]) && is_numeric($id[1])) {
133
				$this->requete_condition[] = 'c.num_nom ='.$this->getBdd()->proteger($id[1]);
133
				$this->requete_condition[] = 'c.num_nom ='.$this->getBdd()->proteger($id[1]);
-
 
134
			} else {
-
 
135
				$e = "Erreur dans votre requĂȘte. <br/> Dans le cas d'une ressource bdtfx.nn: le num nom est obligatoire !";
-
 
136
				$this->renvoyerErreur(RestServeur::HTTP_CODE_MAUVAISE_REQUETE, $e);
134
			}
137
			}
135
		}
138
		}
Line 136... Line 139...
136
		
139
		
137
		$this->requete_champ = 'c.id AS num_nom, i.nom_sci AS titre, t1.resource AS tag, p.body AS texte';
140
		$this->requete_champ = 'c.id AS num_nom, i.nom_sci AS titre, t1.resource AS tag, p.body AS texte';