Line 163... |
Line 163... |
163 |
$chaine_ids_images = implode(',', $id_image_ou_tableau);
|
163 |
$chaine_ids_images = implode(',', $id_image_ou_tableau);
|
164 |
} else {
|
164 |
} else {
|
165 |
$ids_images_non_protegees[] = $id_image_ou_tableau;
|
165 |
$ids_images_non_protegees[] = $id_image_ou_tableau;
|
166 |
$chaine_ids_images = Cel::db()->proteger($id_image_ou_tableau);
|
166 |
$chaine_ids_images = Cel::db()->proteger($id_image_ou_tableau);
|
167 |
}
|
167 |
}
|
- |
|
168 |
$gestion_mots_cles = new GestionMotsClesChemin($this->config, 'images');
|
- |
|
169 |
$resultat_suppression_lien_images_mots_cles = $gestion_mots_cles->supprimerToutesLiaisonsPourIdsElementsLies($ids_images_non_protegees);
|
- |
|
170 |
if (!$resultat_suppression_lien_images_mots_cles === false) {
|
- |
|
171 |
$message = "Erreur lors de la suppression des mots cles associés à l'image" ;
|
- |
|
172 |
$this->logger($message);
|
- |
|
173 |
}
|
Line 168... |
Line 174... |
168 |
|
174 |
|
169 |
$requete = 'DELETE FROM photo '.
|
175 |
$requete = 'DELETE FROM photo '.
|
170 |
"WHERE id in ($chaine_ids_images) ".
|
176 |
"WHERE id in ($chaine_ids_images) ".
|
171 |
' -- '.__FILE__.' : '.__LINE__;
|
177 |
' -- '.__FILE__.' : '.__LINE__;
|
172 |
$resultat_suppression_image = Cel::db()->executer($requete);
|
178 |
$resultat_suppression_image = Cel::db()->executer($requete);
|
173 |
if ($resultat_suppression_image === false) {
|
179 |
if ($resultat_suppression_image === false) {
|
174 |
$message = "Erreur lors de la suppression de l'image" ;
|
180 |
$message = "Erreur lors de la suppression de l'image" ;
|
175 |
$this->logger($message);
|
181 |
$this->logger($message);
|
Line 176... |
Line -... |
176 |
}
|
- |
|
177 |
|
- |
|
178 |
$gestion_mots_cles = new GestionMotsClesChemin($this->config, 'images');
|
- |
|
179 |
$resultat_suppression_lien_images_mots_cles = $gestion_mots_cles->supprimerToutesLiaisonsPourIdsElementsLies($ids_images_non_protegees);
|
- |
|
180 |
if (!$resultat_suppression_lien_images_mots_cles === false) {
|
- |
|
181 |
$message = "Erreur lors de la suppression des mots cles associés à l'image" ;
|
- |
|
182 |
$this->logger($message);
|
- |
|
183 |
}
|
182 |
}
|
184 |
|
183 |
|
185 |
$manipulateur_image = new ImageRecreation($this->config);
|
184 |
$manipulateur_image = new ImageRecreation($this->config);
|
186 |
$tableau_ids_image = explode(',', $chaine_ids_images);
|
185 |
$tableau_ids_image = explode(',', $chaine_ids_images);
|
187 |
foreach ($tableau_ids_image as $id_image_a_detruire) {
|
186 |
foreach ($tableau_ids_image as $id_image_a_detruire) {
|