// Context part 11

This commit is contained in:
tDidierjean
2011-07-18 15:50:58 +00:00
parent 4b7dee58b7
commit 6551a3ece7
60 changed files with 378 additions and 520 deletions
@@ -64,8 +64,7 @@ class BlockPaymentLogo extends Module
public function getContent()
{
global $cookie;
$context = Context::getContext();
$html = '
<h2>'.$this->l('Payment logo').'</h2>
';
@@ -77,7 +76,7 @@ class BlockPaymentLogo extends Module
$html .= $this->displayConfirmation($this->l('Settings are updated'));
}
$cmss = CMS::listCms((int)($cookie->id_lang));
$cmss = CMS::listCms($context->language->id);
if (!sizeof($cmss))
$html .= $this->displayError($this->l('No CMS page is available'));
@@ -113,14 +112,14 @@ class BlockPaymentLogo extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return ;
global $smarty, $cookie;
$context = Context::getContext();
if (!Configuration::get('PS_PAYMENT_LOGO_CMS_ID'))
return;
$cms = new CMS((int)(Configuration::get('PS_PAYMENT_LOGO_CMS_ID')), (int)($cookie->id_lang));
$cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $context->language->id);
if (!Validate::isLoadedObject($cms))
return;
$smarty->assign('cms_payement_logo', $cms);
$context->controller->smarty->assign('cms_payement_logo', $cms);
return $this->display(__FILE__, 'blockpaymentlogo.tpl');
}