// Fix language error caused by blocktopmenu incorrect identifier
This commit is contained in:
@@ -36,7 +36,7 @@ class blocktopmenu extends Module
|
||||
{
|
||||
$this->name = 'blocktopmenu';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = 1.3;
|
||||
$this->version = 1.4;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
@@ -60,7 +60,7 @@ class blocktopmenu extends Module
|
||||
{
|
||||
return (Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
|
||||
`id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`id_linksmenutop` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`id_shop` INT UNSIGNED NOT NULL,
|
||||
`new_window` TINYINT( 1 ) NOT NULL,
|
||||
`link` VARCHAR( 128 ) NOT NULL,
|
||||
@@ -68,11 +68,11 @@ class blocktopmenu extends Module
|
||||
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;') AND
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
|
||||
`id_link` INT NOT NULL,
|
||||
`id_linksmenutop` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
`id_shop` INT NOT NULL,
|
||||
`label` VARCHAR( 128 ) NOT NULL ,
|
||||
INDEX ( `id_link` , `id_lang`, `id_shop`)
|
||||
INDEX ( `id_linksmenutop` , `id_lang`, `id_shop`)
|
||||
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;'));
|
||||
}
|
||||
|
||||
@@ -118,9 +118,9 @@ class blocktopmenu extends Module
|
||||
}
|
||||
if(Tools::isSubmit('submitBlocktopmenuRemove'))
|
||||
{
|
||||
$id_link = Tools::getValue('id_link', 0);
|
||||
MenuTopLinks::remove($id_link, (int)$this->context->shop->id);
|
||||
Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_link.',', 'LNK'.$id_link), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
|
||||
$id_linksmenutop = Tools::getValue('id_linksmenutop', 0);
|
||||
MenuTopLinks::remove($id_linksmenutop, (int)$this->context->shop->id);
|
||||
Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_linksmenutop.',', 'LNK'.$id_linksmenutop), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS')));
|
||||
$this->_html .= $this->displayConfirmation($this->l('The link has been removed'));
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ class blocktopmenu extends Module
|
||||
$this->_html .= '<optgroup label="'.$this->l('Menu Top Links').'">';
|
||||
$links = MenuTopLinks::gets($cookie->id_lang, null, (int)$this->context->shop->id);
|
||||
foreach($links as $link)
|
||||
$this->_html .= '<option value="LNK'.$link['id_link'].'" style="margin-left:10px;">'.$link['label'].'</option>';
|
||||
$this->_html .= '<option value="LNK'.$link['id_linksmenutop'].'" style="margin-left:10px;">'.$link['label'].'</option>';
|
||||
$this->_html .= '</optgroup>';
|
||||
// END Menu Top Links
|
||||
$this->_html .= '</select><br />
|
||||
@@ -302,13 +302,13 @@ class blocktopmenu extends Module
|
||||
{
|
||||
$this->_html .= '
|
||||
<tr>
|
||||
<td>'.$link['id_link'].'</td>
|
||||
<td>'.$link['id_linksmenutop'].'</td>
|
||||
<td>'.$link['label'].'</td>
|
||||
<td>'.$link['link'].'</td>
|
||||
<td>'.(($link['new_window']) ? $this->l('Yes') : $this->l('No')).'</td>
|
||||
<td>
|
||||
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
|
||||
<input type="hidden" name="id_link" value="'.$link['id_link'].'" />
|
||||
<input type="hidden" name="id_linksmenutop" value="'.$link['id_linksmenutop'].'" />
|
||||
<input type="submit" name="submitBlocktopmenuRemove" value="'.$this->l('Remove').'" class="button" />
|
||||
</form>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user