// Context part 12

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7649 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-19 09:28:11 +00:00
parent 8a0a62ae03
commit 89213e18e5
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))