summaryrefslogtreecommitdiff
path: root/app/Controller/File.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
committerFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
commita675271ad71b7713d1b33bdba3c51b2b04813229 (patch)
treee54d8a95e16ca521193b9fd5a5eb071aa2910823 /app/Controller/File.php
parent2fc402f6733573627ad25394d109b9f848ef04f6 (diff)
Rewrite of session management
Diffstat (limited to 'app/Controller/File.php')
-rw-r--r--app/Controller/File.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controller/File.php b/app/Controller/File.php
index 4d771e2f..b46f7d19 100644
--- a/app/Controller/File.php
+++ b/app/Controller/File.php
@@ -22,7 +22,7 @@ class File extends Base
$task = $this->getTask();
if ($this->request->isPost() && $this->file->uploadScreenshot($task['project_id'], $task['id'], $this->request->getValue('screenshot')) !== false) {
- $this->session->flash(t('Screenshot uploaded successfully.'));
+ $this->flash->success(t('Screenshot uploaded successfully.'));
if ($this->request->getStringParam('redirect') === 'board') {
$this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $task['project_id'])));
@@ -62,7 +62,7 @@ class File extends Base
$task = $this->getTask();
if (! $this->file->uploadFiles($task['project_id'], $task['id'], 'files')) {
- $this->session->flashError(t('Unable to upload the file.'));
+ $this->flash->failure(t('Unable to upload the file.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));
@@ -166,9 +166,9 @@ class File extends Base
$file = $this->file->getById($this->request->getIntegerParam('file_id'));
if ($file['task_id'] == $task['id'] && $this->file->remove($file['id'])) {
- $this->session->flash(t('File removed successfully.'));
+ $this->flash->success(t('File removed successfully.'));
} else {
- $this->session->flashError(t('Unable to remove this file.'));
+ $this->flash->failure(t('Unable to remove this file.'));
}
$this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])));