// Context in modules + Shop::sql* methods

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7648 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-19 09:23:10 +00:00
parent 2c493137c3
commit 8a0a62ae03
25 changed files with 127 additions and 263 deletions
+3 -6
View File
@@ -57,19 +57,16 @@ class BlockLanguages extends Module
*/
function hookTop($params)
{
$context = Context::getContext();
$languages = Language::getLanguages(true, $this->shopID);
$languages = Language::getLanguages(true, $this->context->shop->getID());
if (!sizeof($languages))
return '';
$context->controller->smarty->assign('languages', $languages);
$this->context->controller->smarty->assign('languages', $languages);
return $this->display(__FILE__, 'blocklanguages.tpl');
}
function hookHeader($params)
{
$context = Context::getContext();
$context->controller->addCSS(($this->_path).'blocklanguages.css', 'all');
$this->context->controller->addCSS(($this->_path).'blocklanguages.css', 'all');
}
}