// 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
@@ -104,15 +104,15 @@ class AdminDeliverySlipControllerCore extends AdminController
if (Tools::isSubmit('submitAdddelivery'))
{
if (!Validate::isDate(Tools::getValue('date_from')))
$this->_errors[] = Tools::displayError('Invalid from date');
$this->errors[] = Tools::displayError('Invalid from date');
if (!Validate::isDate(Tools::getValue('date_to')))
$this->_errors[] = Tools::displayError('Invalid end date');
if (!count($this->_errors))
$this->errors[] = Tools::displayError('Invalid end date');
if (!count($this->errors))
{
if (count(OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'))))
Tools::redirectAdmin('pdf.php?deliveryslips&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
else
$this->_errors[] = Tools::displayError('No delivery slip found for this period');
$this->errors[] = Tools::displayError('No delivery slip found for this period');
}
}
else