Line 241... |
Line 241... |
241 |
return $this->supprimerImage($id_utilisateur, $ordre_image_ou_tableau);
|
241 |
return $this->supprimerImage($id_utilisateur, $ordre_image_ou_tableau);
|
242 |
}
|
242 |
}
|
Line 243... |
Line 243... |
243 |
|
243 |
|
Line -... |
Line 244... |
- |
|
244 |
public function supprimerImage($id_utilisateur, $id_image_ou_tableau) {
|
244 |
public function supprimerImage($id_utilisateur, $id_image_ou_tableau) {
|
245 |
|
- |
|
246 |
$ids_images_non_protegees = array();
|
245 |
|
247 |
if(is_array($id_image_ou_tableau)) {
|
246 |
if(is_array($id_image_ou_tableau)) {
|
248 |
$ids_images_non_protegees = $id_image_ou_tableau;
|
247 |
$id_image_ou_tableau = array_map(array(Cel::db(),'proteger'),$id_image_ou_tableau);
|
249 |
$id_image_ou_tableau = array_map(array(Cel::db(),'proteger'),$id_image_ou_tableau);
|
- |
|
250 |
$chaine_ids_images = implode(',',$id_image_ou_tableau);
|
248 |
$chaine_ids_images = implode(',',$id_image_ou_tableau);
|
251 |
} else {
|
249 |
} else {
|
252 |
$ids_images_non_protegees[] = $id_image_ou_tableau;
|
Line 250... |
Line 253... |
250 |
$chaine_ids_images = Cel::db()->proteger($id_image_ou_tableau);
|
253 |
$chaine_ids_images = Cel::db()->proteger($id_image_ou_tableau);
|
Line 251... |
Line 254... |
251 |
}
|
254 |
}
|
252 |
|
255 |
|
Line 253... |
Line 256... |
253 |
$requete_suppression_images = "DELETE FROM cel_images WHERE id_image in (".$chaine_ids_images.")";
|
256 |
$requete_suppression_images = "DELETE FROM cel_images WHERE id_image in (".$chaine_ids_images.")";
|
254 |
|
257 |
|
- |
|
258 |
$requete_suppression_lien_images_obs = "DELETE FROM cel_obs_images WHERE id_image in (".$chaine_ids_images.")";
|
- |
|
259 |
$requete_suppression_lien_images_mots_cles = "DELETE FROM cel_images_mots_cles WHERE id_image in (".$chaine_ids_images.")";
|
255 |
$requete_suppression_lien_images_obs = "DELETE FROM cel_obs_images WHERE id_image in (".$chaine_ids_images.")";
|
260 |
|
Line 256... |
Line 261... |
256 |
$requete_suppression_lien_images_mots_cles = "DELETE FROM cel_images_mots_cles WHERE id_image in (".$chaine_ids_images.")";
|
261 |
$resultat_suppression_image = Cel::db()->executerRequeteSimple($requete_suppression_images);
|
257 |
|
262 |
$resultat_suppression_lien_images_obs = Cel::db()->executerRequeteSimple($requete_suppression_lien_images_obs);
|
258 |
$resultat_suppression_image = Cel::db()->executerRequeteSimple($requete_suppression_images);
|
263 |
|
259 |
$resultat_suppression_lien_images_obs = Cel::db()->executerRequeteSimple($requete_suppression_lien_images_obs);
|
264 |
$gestion_mots_cles = new GestionMotsClesChemin($this->config, 'images');
|