diff --git a/src/Controller/PagesController.php b/src/Controller/PagesController.php index 4ab565a4..3c5436c0 100644 --- a/src/Controller/PagesController.php +++ b/src/Controller/PagesController.php @@ -564,6 +564,8 @@ public function administration($img = null) //gestion des images du carousel $pathCar = WWW_ROOT . "img/carousel/"; $pathTV = WWW_ROOT . "img/tv/"; + chmod($pathCar, 777); + chmod($pathTV, 777); $request = $this->request; if (is_file($pathCar . $img)) { @@ -572,6 +574,8 @@ public function administration($img = null) } else { $this->Flash->error(__('no file deleted'), 'er_gene'); } + }else { + $this->Flash->error(__('This file does not exist'), 'er_gene'); } if ($request->is('post') && !empty($request->data)) { $image = $request->data['avatar_file'];