Permalink
Browse files

Call delMediaById() instead of deleteById()

  • Loading branch information...
blackcoder87 committed Apr 2, 2017
1 parent 0155800 commit f22c1b1705d618da088dd2f6de41579853109fc6
Showing with 3 additions and 1 deletion.
  1. +3 −1 application/modules/user/controllers/Panel.php
@@ -509,8 +509,10 @@ public function treatGalleryAction()
->add($gallery->getTitle(), ['controller' => 'panel', 'action' => 'treatgallery', 'id' => $id]);
if ($this->getRequest()->getPost('action') == 'delete') {
$mediaMapper = new MediaMapper();
foreach ($this->getRequest()->getPost('check_gallery') as $imageId) {
$imageMapper->deleteById($imageId);
$mediaMapper->delMediaById($imageId);
}
$this->addMessage('deleteSuccess');

0 comments on commit f22c1b1

Please sign in to comment.