aboutsummaryrefslogtreecommitdiff
path: root/app/class/controllermedia.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-03-28 19:45:59 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-03-28 19:45:59 +0100
commit53fcf8ed3cf59f38adfa4d66e925e147a64f7eef (patch)
tree6c81688e43de8a4746bd981eff2090cf9f6373cb /app/class/controllermedia.php
parentd97c84ab440b2b68a8068b813638117244864937 (diff)
downloadwcms-53fcf8ed3cf59f38adfa4d66e925e147a64f7eef.tar.gz
wcms-53fcf8ed3cf59f38adfa4d66e925e147a64f7eef.zip
thumbnail
Diffstat (limited to 'app/class/controllermedia.php')
-rw-r--r--app/class/controllermedia.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/class/controllermedia.php b/app/class/controllermedia.php
index 91f5a03..6bc38d9 100644
--- a/app/class/controllermedia.php
+++ b/app/class/controllermedia.php
@@ -20,10 +20,13 @@ class Controllermedia extends Controller
if ($this->user->iseditor()) {
if (!$this->mediamanager->basedircheck()) {
- throw new Exception("Error : Cant create /media folder");
+ throw new Exception("Media error : Cant create /media folder");
}
if (!$this->mediamanager->favicondircheck()) {
- throw new Exception("Error : Cant create /media/favicon folder");
+ throw new Exception("Media error : Cant create /media/favicon folder");
+ }
+ if (!$this->mediamanager->thumbnaildircheck()) {
+ throw new Exception("Media error : Cant create /media/thumbnail folder");
}
@@ -50,7 +53,7 @@ class Controllermedia extends Controller
if ($this->user->iseditor()) {
$target = $_POST['dir'] ?? Model::MEDIA_DIR;
if (!empty($_FILES['file']['name'][0])) {
- $this->mediamanager->upload($target);
+ $this->mediamanager->multiupload('file', $target);
}
$this->redirect($this->router->generate('media') . '?path=' . $target);
} else {