// Refactor AdminController::_errors to errors

This commit is contained in:
tDidierjean
2012-01-11 08:58:12 +00:00
parent 9a607a1610
commit 8a757aaa9c
68 changed files with 857 additions and 859 deletions
@@ -334,7 +334,7 @@ class AdminSuppliersControllerCore extends AdminController
// checks access
if (Tools::isSubmit('submitAdd'.$this->table) && !($this->tabAccess['add'] === '1'))
{
$this->_errors[] = Tools::displayError('You do not have the required permissions to add suppliers.');
$this->errors[] = Tools::displayError('You do not have the required permissions to add suppliers.');
return parent::postProcess();
}
@@ -366,8 +366,8 @@ class AdminSuppliersControllerCore extends AdminController
if (count($validation) > 0)
{
foreach ($validation as $item)
$this->_errors[] = $item;
$this->_errors[] = Tools::displayError('The address is not correct. Check if all required fields are filled.');
$this->errors[] = $item;
$this->errors[] = Tools::displayError('The address is not correct. Check if all required fields are filled.');
}
else
{
@@ -386,7 +386,7 @@ class AdminSuppliersControllerCore extends AdminController
if (!($obj = $this->loadObject(true)))
return;
else if (SupplyOrder::supplierHasPendingOrders($obj->id))
$this->_errors[] = $this->l('It is not possible to delete a supplier if there is/are pending supply order(s).');
$this->errors[] = $this->l('It is not possible to delete a supplier if there is/are pending supply order(s).');
else
{
$address = new Address($obj->id_address);