Rename all models
This commit is contained in:
@@ -20,11 +20,11 @@ class CurrencyController extends BaseController
|
||||
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')),
|
||||
'config_values' => array('application_currency' => $this->configModel->get('application_currency')),
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
'rates' => $this->currency->getAll(),
|
||||
'currencies' => $this->currency->getCurrencies(),
|
||||
'rates' => $this->currencyModel->getAll(),
|
||||
'currencies' => $this->currencyModel->getCurrencies(),
|
||||
'title' => t('Settings').' > '.t('Currency rates'),
|
||||
)));
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class CurrencyController extends BaseController
|
||||
list($valid, $errors) = $this->currencyValidator->validateCreation($values);
|
||||
|
||||
if ($valid) {
|
||||
if ($this->currency->create($values['currency'], $values['rate'])) {
|
||||
if ($this->currencyModel->create($values['currency'], $values['rate'])) {
|
||||
$this->flash->success(t('The currency rate have been added successfully.'));
|
||||
return $this->response->redirect($this->helper->url->to('CurrencyController', 'index'));
|
||||
} else {
|
||||
@@ -60,7 +60,7 @@ class CurrencyController extends BaseController
|
||||
{
|
||||
$values = $this->request->getValues();
|
||||
|
||||
if ($this->config->save($values)) {
|
||||
if ($this->configModel->save($values)) {
|
||||
$this->flash->success(t('Settings saved successfully.'));
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to save your settings.'));
|
||||
|
||||
Reference in New Issue
Block a user