diff options
| author | 85pando <85pando@googlemail.com> | 2016-02-05 10:28:40 +0100 |
|---|---|---|
| committer | 85pando <85pando@googlemail.com> | 2016-02-05 10:28:40 +0100 |
| commit | 791d13c87bf510d913973b77a5f6d152311a1d87 (patch) | |
| tree | 81412e8dbd3ac4fa0047030a6068afafd975687e /app/Controller/File.php | |
| parent | 2074aaaa9a75455097e4e77ca09f4fba3e567052 (diff) | |
| parent | 12aaec03b19a07635f59b00f532c92c37ac1df5f (diff) | |
Merge remote-tracking branch 'refs/remotes/upstream/master'
Conflicts:
app/Locale/de_DE/translations.php
Diffstat (limited to 'app/Controller/File.php')
| -rw-r--r-- | app/Controller/File.php | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/app/Controller/File.php b/app/Controller/File.php index b46f7d19..50db3865 100644 --- a/app/Controller/File.php +++ b/app/Controller/File.php @@ -23,17 +23,11 @@ class File extends Base if ($this->request->isPost() && $this->file->uploadScreenshot($task['project_id'], $task['id'], $this->request->getValue('screenshot')) !== false) { $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']))); - } - - $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } - $this->response->html($this->taskLayout('file/screenshot', array( + $this->response->html($this->helper->layout->task('file/screenshot', array( 'task' => $task, - 'redirect' => 'task', ))); } @@ -46,7 +40,7 @@ class File extends Base { $task = $this->getTask(); - $this->response->html($this->taskLayout('file/new', array( + $this->response->html($this->helper->layout->task('file/new', array( 'task' => $task, 'max_size' => ini_get('upload_max_filesize'), ))); @@ -65,7 +59,7 @@ class File extends Base $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']))); + $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } /** @@ -184,7 +178,7 @@ class File extends Base $task = $this->getTask(); $file = $this->file->getById($this->request->getIntegerParam('file_id')); - $this->response->html($this->taskLayout('file/remove', array( + $this->response->html($this->helper->layout->task('file/remove', array( 'task' => $task, 'file' => $file, ))); |
