// 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
@@ -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