// Norm on controllers

This commit is contained in:
rMalie
2011-09-30 13:50:55 +00:00
parent 8d19f130d7
commit f65df2f2ae
38 changed files with 252 additions and 272 deletions
@@ -39,7 +39,7 @@ class GuestTrackingControllerCore extends FrontController
if ($this->context->customer->isLogged())
Tools::redirect('history.php');
}
/**
* Start forms process
* @see FrontController::postProcess()
@@ -51,7 +51,7 @@ class GuestTrackingControllerCore extends FrontController
$id_order = (int)Tools::getValue('id_order');
$email = Tools::getValue('email');
$order = new Order((int)$id_order);
if (empty($id_order))
$this->errors[] = Tools::displayError('Please provide your Order ID');
else if (empty($email))
@@ -92,20 +92,21 @@ class GuestTrackingControllerCore extends FrontController
/**
* Assign template vars related to page content
* @see FrontController::process()
* @see FrontController::initContent()
*/
public function process()
public function initContent()
{
parent::process();
/* Handle brute force attacks */
if (count($this->errors))
sleep(1);
$this->context->smarty->assign(array('action' => $this->context->link->getPageLink('guest-tracking.php'), 'errors' => $this->errors));
$this->context->smarty->assign(array(
'action' => $this->context->link->getPageLink('guest-tracking.php'),
'errors' => $this->errors,
));
$this->setTemplate(_PS_THEME_DIR_.'guest-tracking.tpl');
}
/**
* Assign template vars related to order tracking informations
*/