[*] PROJECT : New Module API (part 1)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9790 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2011-11-02 10:49:01 +00:00
parent 953cb8b872
commit 0ba4fe9c7e
53 changed files with 640 additions and 339 deletions
+7 -7
View File
@@ -118,8 +118,8 @@ class AuthControllerCore extends FrontController
// Call a hook to display more information on form
$this->context->smarty->assign(array(
'HOOK_CREATE_ACCOUNT_FORM' => Module::hookExec('createAccountForm'),
'HOOK_CREATE_ACCOUNT_TOP' => Module::hookExec('createAccountTop')
'HOOK_CREATE_ACCOUNT_FORM' => Hook::exec('createAccountForm'),
'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('createAccountTop')
));
$this->setTemplate(_PS_THEME_DIR_.'authentication.tpl');
}
@@ -235,7 +235,7 @@ class AuthControllerCore extends FrontController
*/
protected function processSubmitLogin()
{
Module::hookExec('beforeAuthentication');
Hook::exec('beforeAuthentication');
$passwd = trim(Tools::getValue('passwd'));
$email = trim(Tools::getValue('email'));
if (empty($email))
@@ -275,7 +275,7 @@ class AuthControllerCore extends FrontController
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
$this->context->cart->update();
Module::hookExec('authentication');
Hook::exec('authentication');
// Login information have changed, so we check if the cart rules still apply
CartRule::autoRemoveFromCart();
@@ -352,7 +352,7 @@ class AuthControllerCore extends FrontController
$this->updateContext($customer);
$this->context->cart->update();
Module::hookExec('createAccount', array(
Hook::exec('createAccount', array(
'_POST' => $_POST,
'newCustomer' => $customer
));
@@ -472,7 +472,7 @@ class AuthControllerCore extends FrontController
// If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated
$this->context->cart->update();
Module::hookExec('createAccount', array(
Hook::exec('createAccount', array(
'_POST' => $_POST,
'newCustomer' => $customer
));
@@ -581,4 +581,4 @@ class AuthControllerCore extends FrontController
$customer->firstname.' '.$customer->lastname
);
}
}
}