// Refactor AdminController::_errors to errors

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12331 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-01-11 08:58:12 +00:00
parent 3b5be15831
commit ad1fd29cea
68 changed files with 857 additions and 859 deletions
@@ -60,13 +60,13 @@ class AdminCartRulesControllerCore extends AdminController
// Idiot-proof control
if (strtotime(Tools::getValue('date_from')) > strtotime(Tools::getValue('date_to')))
$this->_errors[] = Tools::displayError('The voucher cannot end before it begins');
$this->errors[] = Tools::displayError('The voucher cannot end before it begins');
if ((int)Tools::getValue('minimum_amount') < 0)
$this->_errors[] = Tools::displayError('Minimum amount cannot be lower than 0');
$this->errors[] = Tools::displayError('Minimum amount cannot be lower than 0');
if ((float)Tools::getValue('reduction_percent') < 0 || (float)Tools::getValue('reduction_percent') > 100)
$this->_errors[] = Tools::displayError('Reduction percent must range from 0% to 100%');
$this->errors[] = Tools::displayError('Reduction percent must range from 0% to 100%');
if ((int)Tools::getValue('reduction_amount') < 0)
$this->_errors[] = Tools::displayError('Reduction amount cannot be lower than 0');
$this->errors[] = Tools::displayError('Reduction amount cannot be lower than 0');
}
return parent::postProcess();