From 655d75a3cf154d14b10ffbf2baa42a549cf214f7 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 25 Jan 2015 10:47:21 -0500 Subject: Add new constants: FILES_DIR and DEBUG_FILE --- app/Controller/File.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/Controller/File.php') diff --git a/app/Controller/File.php b/app/Controller/File.php index 63052610..3255fe84 100644 --- a/app/Controller/File.php +++ b/app/Controller/File.php @@ -2,8 +2,6 @@ namespace Controller; -use Model\File as FileModel; - /** * File controller * @@ -54,7 +52,7 @@ class File extends Base { $task = $this->getTask(); $file = $this->file->getById($this->request->getIntegerParam('file_id')); - $filename = FileModel::BASE_PATH.$file['path']; + $filename = FILES_DIR.$file['path']; if ($file['task_id'] == $task['id'] && file_exists($filename)) { $this->response->forceDownload($file['name']); @@ -91,7 +89,7 @@ class File extends Base { $task = $this->getTask(); $file = $this->file->getById($this->request->getIntegerParam('file_id')); - $filename = FileModel::BASE_PATH.$file['path']; + $filename = FILES_DIR.$file['path']; if ($file['task_id'] == $task['id'] && file_exists($filename)) { $metadata = getimagesize($filename); -- cgit v1.2.3