diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 11:31:54 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 11:31:54 -0400 |
commit | ab48a09f0d674b703467975b376c5ac7352670ae (patch) | |
tree | 99fbb0cf719acee8c500622d498bd7f6375b62a1 /app/Controller/Currency.php | |
parent | 82b5b491bec94cb3d40a5820fbef9959435309be (diff) |
Rename controllers
Diffstat (limited to 'app/Controller/Currency.php')
-rw-r--r-- | app/Controller/Currency.php | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/app/Controller/Currency.php b/app/Controller/Currency.php deleted file mode 100644 index 872d6929..00000000 --- a/app/Controller/Currency.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -namespace Kanboard\Controller; - -/** - * Currency controller - * - * @package controller - * @author Frederic Guillot - */ -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()) - { - $this->response->html($this->helper->layout->config('currency/index', array( - 'config_values' => array('application_currency' => $this->config->get('application_currency')), - 'values' => $values, - 'errors' => $errors, - 'rates' => $this->currency->getAll(), - 'currencies' => $this->currency->getCurrencies(), - 'title' => t('Settings').' > '.t('Currency rates'), - ))); - } - - /** - * Validate and save a new currency rate - * - * @access public - */ - public function create() - { - $values = $this->request->getValues(); - list($valid, $errors) = $this->currencyValidator->validateCreation($values); - - if ($valid) { - if ($this->currency->create($values['currency'], $values['rate'])) { - $this->flash->success(t('The currency rate have been added successfully.')); - return $this->response->redirect($this->helper->url->to('currency', 'index')); - } else { - $this->flash->failure(t('Unable to add this currency rate.')); - } - } - - return $this->index($values, $errors); - } - - /** - * Save reference currency - * - * @access public - */ - public function reference() - { - $values = $this->request->getValues(); - - if ($this->config->save($values)) { - $this->flash->success(t('Settings saved successfully.')); - } else { - $this->flash->failure(t('Unable to save your settings.')); - } - - $this->response->redirect($this->helper->url->to('currency', 'index')); - } -} |