Subversion Repositories eFlore/Applications.del

Rev

Rev 1158 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1158 Rev 1436
Line 12... Line 12...
12
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
13
 * @version	$Id$
13
 * @version	$Id$
14
 * @see http://www.tela-botanica.org/wikini/eflore/wakka.php?wiki=ApiIdentiplante01Images
14
 * @see http://www.tela-botanica.org/wikini/eflore/wakka.php?wiki=ApiIdentiplante01Images
15
 */
15
 */
Line -... Line 16...
-
 
16
 
-
 
17
require_once('MotClePictoflora.php');
16
 
18
 
Line 17... Line 19...
17
class SupprimerMotCle {
19
class SupprimerMotCle {
18
	
20
	
19
	private $conteneur;
21
	private $conteneur;
Line 89... Line 91...
89
	/**
91
	/**
90
	 * Supprime un mot clé dans la table
92
	 * Supprime un mot clé dans la table
91
	 * @param $id_mot_cle string identifiant de mot clé
93
	 * @param $id_mot_cle string identifiant de mot clé
92
	 * */
94
	 * */
93
	private function supprimerMotCle($id_mot_cle) {
95
	private function supprimerMotCle($id_mot_cle) {
94
		
-
 
95
		$valeurs_a_supprimer = '';
-
 
96
		
-
 
97
		$requete = 'UPDATE del_image_tag '.
96
		$retour = $this->bdd->requeter(sprintf('UPDATE del_image_tag '.
98
					'SET actif = 0, date_modification = NOW() '.
97
											   'SET actif = 0, date_modification = NOW() '.
-
 
98
											   'WHERE id_tag = %d',
99
					'WHERE id_tag ='.$this->bdd->proteger($id_mot_cle);
99
											   intval($id_mot_cle)));
Line 100... Line -...
100
 
-
 
101
		$retour = $this->bdd->requeter($requete);
100
 
102
		if ($retour == null) {
101
		if ($retour == null) {
103
			$e = 'Erreur inopinée lors de la suppression';
102
			$e = 'Erreur inopinée lors de la suppression';
104
			throw new Exception($e, RestServeur::HTTP_CODE_ERREUR);
103
			throw new Exception($e, RestServeur::HTTP_CODE_ERREUR);
-
 
104
		}
-
 
105
 
105
		}
106
		MotClePictoflora::updateStats($this->bdd, $id_mot_cle);
106
		return null;
107
		return null;
107
	}
108
	}
108
}
109
}
109
?>
110
?>