// Context part 26

This commit is contained in:
tDidierjean
2011-07-28 16:37:50 +00:00
parent b81e389bc0
commit cac7807513
18 changed files with 101 additions and 115 deletions
@@ -54,11 +54,10 @@ class blockcustomerprivacy extends Module
public function getContent()
{
global $cookie;
$context = Context::getContext();
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages(false);
$iso = Language::getIsoById((int)$cookie->id_lang);
$iso = $context->language->iso_code;
if (Tools::isSubmit('submitCustPrivMess'))
{
@@ -152,16 +151,10 @@ class blockcustomerprivacy extends Module
{
if (!$this->active)
return ;
global $smarty, $cookie;
$context = Context::getContext();
/* Languages preliminaries */
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages(false);
$iso = Language::getIsoById((int)($cookie->id_lang));
$smarty->assign(array(
'privacy_message' => Configuration::get('CUSTPRIV_MESSAGE', (int)($cookie->id_lang)),
$context->smarty->assign(array(
'privacy_message' => Configuration::get('CUSTPRIV_MESSAGE', $context->language->id),
'error_message' => $this->l('Please agree with the customer data privacy by ticking the checkbox below.')
));
return $this->display(__FILE__, 'blockcustomerprivacy.tpl');