// Context part 27

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-29 14:29:57 +00:00
parent 35748d1b8f
commit 5d090a25b3
66 changed files with 532 additions and 813 deletions
+6 -9
View File
@@ -117,7 +117,6 @@ class Editorial extends Module
public function getContent()
{
$context = Context::getContext();
/* display the module name */
$this->_html = '<h2>'.$this->displayName.'</h2>';
@@ -132,7 +131,7 @@ class Editorial extends Module
{
unlink(dirname(__FILE__).'/homepage_logo.jpg');
Configuration::updateValue('EDITORIAL_IMAGE_DISABLE', 1);
Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$context->employee->id));
Tools::redirectAdmin('index.php?tab=AdminModules&configure='.$this->name.'&token='.Tools::getAdminToken('AdminModules'.(int)(Tab::getIdFromClassName('AdminModules')).(int)$this->context->employee->id));
}
$this->_html .= $errors;
}
@@ -180,11 +179,10 @@ class Editorial extends Module
private function _displayForm()
{
$context = Context::getContext();
/* Languages preliminaries */
$defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
$languages = Language::getLanguages(false);
$iso = $context->language->iso_code;
$iso = $this->context->language->iso_code;
$divLangName = 'title¤subheading¤cpara¤logo_subheading';
$editorial = new EditorialClass(1);
@@ -294,15 +292,14 @@ class Editorial extends Module
public function hookHome($params)
{
$context = Context::getContext();
$editorial = new EditorialClass(1, $context->language->id);
$context->smarty->assign(array(
$editorial = new EditorialClass(1, $this->context->language->id);
$this->context->smarty->assign(array(
'editorial' => $editorial,
'default_lang' => (int)$context->language->id,
'default_lang' => (int)$this->context->language->id,
'image_width' => Configuration::get('EDITORIAL_IMAGE_WIDTH'),
'image_height' => Configuration::get('EDITORIAL_IMAGE_HEIGHT'),
'id_lang' => $context->language->id,
'id_lang' => $this->context->language->id,
'homepage_logo' => !Configuration::get('EDITORIAL_IMAGE_DISABLE') && file_exists('modules/editorial/homepage_logo.jpg'),
'image_path' => $this->_path.'homepage_logo.jpg'
));