From 67b836164997527b91452b19adbcb8aa3c5decf1 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 May 2016 18:31:47 -0400 Subject: Refactoring: added controlled middleware and changed response class --- app/Controller/Currency.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/Controller/Currency.php') diff --git a/app/Controller/Currency.php b/app/Controller/Currency.php index 3e0de905..872d6929 100644 --- a/app/Controller/Currency.php +++ b/app/Controller/Currency.php @@ -8,12 +8,14 @@ namespace Kanboard\Controller; * @package controller * @author Frederic Guillot */ -class Currency extends Base +class Currency extends BaseController { /** * Display all currency rates and form * * @access public + * @param array $values + * @param array $errors */ public function index(array $values = array(), array $errors = array()) { @@ -40,13 +42,13 @@ class Currency extends Base if ($valid) { if ($this->currency->create($values['currency'], $values['rate'])) { $this->flash->success(t('The currency rate have been added successfully.')); - $this->response->redirect($this->helper->url->to('currency', 'index')); + return $this->response->redirect($this->helper->url->to('currency', 'index')); } else { $this->flash->failure(t('Unable to add this currency rate.')); } } - $this->index($values, $errors); + return $this->index($values, $errors); } /** -- cgit v1.2.3