diff --git a/blocktopmenu.php b/blocktopmenu.php index 58f174c..75c7baa 100644 --- a/blocktopmenu.php +++ b/blocktopmenu.php @@ -715,7 +715,8 @@ class Blocktopmenu extends Module public function hookDisplayTop($param) { - $this->user_groups = ($this->context->customer->isLogged() ? $this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP'))); + $this->user_groups = ($this->context->customer->isLogged() ? + $this->context->customer->getGroups() : array(Configuration::get('PS_UNIDENTIFIED_GROUP'))); $this->page_name = Dispatcher::getInstance()->getController(); if (!$this->isCached('blocktopmenu.tpl', $this->getCacheId())) { @@ -915,7 +916,7 @@ class Blocktopmenu extends Module WHERE id_shop = '.(int)$params['old_id_shop'] ); - foreach($linksmenutop as $id => $link) + foreach ($linksmenutop as $id => $link) { Db::getInstance()->execute(' INSERT IGNORE INTO '._DB_PREFIX_.'linksmenutop (id_linksmenutop, id_shop, new_window) @@ -924,14 +925,14 @@ class Blocktopmenu extends Module $linksmenutop[$id]['new_id_linksmenutop'] = Db::getInstance()->Insert_ID(); } - foreach($linksmenutop as $id => $link) + foreach ($linksmenutop as $id => $link) { $lang = Db::getInstance()->executeS(' SELECT id_lang, '.(int)$params['new_id_shop'].', label, link FROM '._DB_PREFIX_.'linksmenutop_lang WHERE id_linksmenutop = '.(int)$link['id_linksmenutop'].' AND id_shop = '.(int)$params['old_id_shop']); - foreach($lang as $l) + foreach ($lang as $l) Db::getInstance()->execute(' INSERT IGNORE INTO '._DB_PREFIX_.'linksmenutop_lang (id_linksmenutop, id_lang, id_shop, label, link) VALUES ('.(int)$link['new_id_linksmenutop'].', '.(int)$l['id_lang'].', '.(int)$params['new_id_shop'].', '.(int)$l['label'].', '.(int)$l['link'].' )'); @@ -988,7 +989,8 @@ class Blocktopmenu extends Module 'title' => $this->l('Menu Top Link'), 'icon' => 'icon-link' ), - 'info' => '
' .$this->l('All active products combinations quantities will be changed').'
', + 'info' => '
'. + $this->l('All active products combinations quantities will be changed').'
', 'input' => array( array( 'type' => 'switch', @@ -1018,14 +1020,15 @@ class Blocktopmenu extends Module $helper = new HelperForm(); $helper->show_toolbar = false; - $helper->table = $this->table; + $helper->table = $this->table; $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); $helper->default_form_language = $lang->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $this->fields_form = array(); $helper->module = $this; $helper->identifier = $this->identifier; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false). + '&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFieldsValues(), @@ -1042,7 +1045,8 @@ class Blocktopmenu extends Module $fields_form = array( 'form' => array( 'legend' => array( - 'title' => (Tools::getIsset('updatelinksmenutop') && !Tools::getValue('updatelinksmenutop')) ? $this->l('Update link') : $this->l('Add a new link'), + 'title' => (Tools::getIsset('updatelinksmenutop') && !Tools::getValue('updatelinksmenutop')) ? + $this->l('Update link') : $this->l('Add a new link'), 'icon' => 'icon-link' ), 'input' => array( @@ -1086,7 +1090,7 @@ class Blocktopmenu extends Module $helper = new HelperForm(); $helper->show_toolbar = false; - $helper->table = $this->table; + $helper->table = $this->table; $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT')); $helper->default_form_language = $lang->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; @@ -1107,9 +1111,10 @@ class Blocktopmenu extends Module $helper->fields_value['updatelink'] = ''; } - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false). + '&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->languages =$this->context->controller->getLanguages(); + $helper->languages = $this->context->controller->getLanguages(); $helper->default_form_language = (int)$this->context->language->id; return $helper->generateForm(array($fields_form)); @@ -1120,7 +1125,6 @@ class Blocktopmenu extends Module $spacer = str_repeat(' ', $this->spacer_size); $items = $this->getMenuItems(); - $html = '