// Context part 12

This commit is contained in:
tDidierjean
2011-07-19 09:28:11 +00:00
parent ff81f71449
commit 52339502b6
53 changed files with 184 additions and 196 deletions
+4 -5
View File
@@ -45,7 +45,7 @@ class AddressControllerCore extends FrontController
public function preProcess()
{
parent::preProcess();
$context = Context::getContext();
if ($back = Tools::getValue('back'))
$this->smarty->assign('back', Tools::safeOutput($back));
if ($mod = Tools::getValue('mod'))
@@ -202,11 +202,10 @@ class AddressControllerCore extends FrontController
}
elseif (!$id_address)
{
$customer = new Customer((int)(self::$cookie->id_customer));
if (Validate::isLoadedObject($customer))
if (Validate::isLoadedObject($context->customer))
{
$_POST['firstname'] = $customer->firstname;
$_POST['lastname'] = $customer->lastname;
$_POST['firstname'] = $context->customer->firstname;
$_POST['lastname'] = $context->customer->lastname;
}
}
if (Tools::isSubmit('ajax') AND sizeof($this->errors))