From 762fdb9f40fa982a5606cbe01f7a3455d3680caf Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 9 Mar 2015 21:38:50 -0400 Subject: Lowercase filename --- app/Controller/HourlyRate.php | 89 ------------------------------------------- app/Controller/Hourlyrate.php | 89 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 89 deletions(-) delete mode 100644 app/Controller/HourlyRate.php create mode 100644 app/Controller/Hourlyrate.php diff --git a/app/Controller/HourlyRate.php b/app/Controller/HourlyRate.php deleted file mode 100644 index 8d96e5ca..00000000 --- a/app/Controller/HourlyRate.php +++ /dev/null @@ -1,89 +0,0 @@ -getUser(); - - $this->response->html($this->layout('hourlyrate/index', array( - 'rates' => $this->hourlyRate->getAllByUser($user['id']), - 'currencies_list' => $this->config->getCurrencies(), - 'values' => $values + array('user_id' => $user['id']), - 'errors' => $errors, - 'user' => $user, - ))); - } - - /** - * Validate and save a new rate - * - * @access public - */ - public function save() - { - $values = $this->request->getValues(); - list($valid, $errors) = $this->hourlyRate->validateCreation($values); - - if ($valid) { - - if ($this->hourlyRate->create($values['user_id'], $values['rate'], $values['currency'], $values['date_effective'])) { - $this->session->flash(t('Hourly rate created successfully.')); - $this->response->redirect($this->helper->url('hourlyrate', 'index', array('user_id' => $values['user_id']))); - } - else { - $this->session->flashError(t('Unable to save the hourly rate.')); - } - } - - $this->index($values, $errors); - } - - /** - * Confirmation dialag box to remove a row - * - * @access public - */ - public function confirm() - { - $user = $this->getUser(); - - $this->response->html($this->layout('hourlyrate/remove', array( - 'rate_id' => $this->request->getIntegerParam('rate_id'), - 'user' => $user, - ))); - } - - /** - * Remove a row - * - * @access public - */ - public function remove() - { - $this->checkCSRFParam(); - $user = $this->getUser(); - - if ($this->hourlyRate->remove($this->request->getIntegerParam('rate_id'))) { - $this->session->flash(t('Rate removed successfully.')); - } - else { - $this->session->flash(t('Unable to remove this rate.')); - } - - $this->response->redirect($this->helper->url('hourlyrate', 'index', array('user_id' => $user['id']))); - } -} diff --git a/app/Controller/Hourlyrate.php b/app/Controller/Hourlyrate.php new file mode 100644 index 00000000..8d96e5ca --- /dev/null +++ b/app/Controller/Hourlyrate.php @@ -0,0 +1,89 @@ +getUser(); + + $this->response->html($this->layout('hourlyrate/index', array( + 'rates' => $this->hourlyRate->getAllByUser($user['id']), + 'currencies_list' => $this->config->getCurrencies(), + 'values' => $values + array('user_id' => $user['id']), + 'errors' => $errors, + 'user' => $user, + ))); + } + + /** + * Validate and save a new rate + * + * @access public + */ + public function save() + { + $values = $this->request->getValues(); + list($valid, $errors) = $this->hourlyRate->validateCreation($values); + + if ($valid) { + + if ($this->hourlyRate->create($values['user_id'], $values['rate'], $values['currency'], $values['date_effective'])) { + $this->session->flash(t('Hourly rate created successfully.')); + $this->response->redirect($this->helper->url('hourlyrate', 'index', array('user_id' => $values['user_id']))); + } + else { + $this->session->flashError(t('Unable to save the hourly rate.')); + } + } + + $this->index($values, $errors); + } + + /** + * Confirmation dialag box to remove a row + * + * @access public + */ + public function confirm() + { + $user = $this->getUser(); + + $this->response->html($this->layout('hourlyrate/remove', array( + 'rate_id' => $this->request->getIntegerParam('rate_id'), + 'user' => $user, + ))); + } + + /** + * Remove a row + * + * @access public + */ + public function remove() + { + $this->checkCSRFParam(); + $user = $this->getUser(); + + if ($this->hourlyRate->remove($this->request->getIntegerParam('rate_id'))) { + $this->session->flash(t('Rate removed successfully.')); + } + else { + $this->session->flash(t('Unable to remove this rate.')); + } + + $this->response->redirect($this->helper->url('hourlyrate', 'index', array('user_id' => $user['id']))); + } +} -- cgit v1.2.3