// small fix
This commit is contained in:
+10
-9
@@ -52,7 +52,7 @@ class Blocktopmenu extends Module
|
||||
{
|
||||
$this->name = 'blocktopmenu';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.12';
|
||||
$this->version = '1.13';
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
$this->bootstrap = true;
|
||||
@@ -213,7 +213,7 @@ class Blocktopmenu extends Module
|
||||
}
|
||||
$update_cache = true;
|
||||
}
|
||||
|
||||
|
||||
if ($update_cache)
|
||||
$this->clearMenuCache();
|
||||
|
||||
@@ -299,7 +299,7 @@ class Blocktopmenu extends Module
|
||||
case 'ALLSUP':
|
||||
$html .= '<option selected="selected" value="ALLSUP0">'.$this->l('All suppliers').'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
|
||||
case 'SUP':
|
||||
$supplier = new Supplier((int)$id, (int)$id_lang);
|
||||
if (Validate::isLoadedObject($supplier))
|
||||
@@ -315,9 +315,10 @@ class Blocktopmenu extends Module
|
||||
$default_language = Configuration::get('PS_LANG_DEFAULT');
|
||||
$link = MenuTopLinks::get($link[0]['id_linksmenutop'], (int)$default_language, (int)Shop::getContextShopID());
|
||||
}
|
||||
$html .= '<option selected="selected" value="LNK'.$link[0]['id_linksmenutop'].'">'.$link[0]['label'].'</option>';
|
||||
$html .= '<option selected="selected" value="LNK'.(int)$link[0]['id_linksmenutop'].'">'.Tools::safeOutput($link[0]['label']).'</option>';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'SHOP':
|
||||
$shop = new Shop((int)$id);
|
||||
if (Validate::isLoadedObject($shop))
|
||||
@@ -325,6 +326,7 @@ class Blocktopmenu extends Module
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $html.'</select>';
|
||||
}
|
||||
|
||||
@@ -458,7 +460,6 @@ class Blocktopmenu extends Module
|
||||
$html .= $this->generateCategoriesOption($category['children'], $items_to_skip);
|
||||
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -930,7 +931,7 @@ class Blocktopmenu extends Module
|
||||
{
|
||||
$spacer = str_repeat(' ', $this->spacer_size);
|
||||
$items = $this->getMenuItems();
|
||||
|
||||
|
||||
$html = '<select multiple="multiple" id="availableItems" style="width: 300px; height: 160px;">';
|
||||
$html .= '<optgroup label="'.$this->l('CMS').'">';
|
||||
$html .= $this->getCMSOptions(0, 1, $this->context->language->id, $items);
|
||||
@@ -962,7 +963,7 @@ class Blocktopmenu extends Module
|
||||
$html .= $this->generateCategoriesOption(
|
||||
Category::getNestedCategories(null, (int)$this->context->language->id, true), $items);
|
||||
$html .= '</optgroup>';
|
||||
|
||||
|
||||
// BEGIN Shops
|
||||
if (Shop::isFeatureActive())
|
||||
{
|
||||
@@ -994,10 +995,10 @@ class Blocktopmenu extends Module
|
||||
$default_language = Configuration::get('PS_LANG_DEFAULT');
|
||||
$link = MenuTopLinks::get($link['id_linksmenutop'], $default_language, (int)Shop::getContextShopID());
|
||||
if (!in_array('LNK'.(int)$link[0]['id_linksmenutop'], $items))
|
||||
$html .= '<option value="LNK'.(int)$link[0]['id_linksmenutop'].'">'.$spacer.$link[0]['label'].'</option>';
|
||||
$html .= '<option value="LNK'.(int)$link[0]['id_linksmenutop'].'">'.$spacer.Tools::safeOutput($link[0]['label']).'</option>';
|
||||
}
|
||||
elseif (!in_array('LNK'.(int)$link['id_linksmenutop'], $items))
|
||||
$html .= '<option value="LNK'.(int)$link['id_linksmenutop'].'">'.$spacer.$link['label'].'</option>';
|
||||
$html .= '<option value="LNK'.(int)$link['id_linksmenutop'].'">'.$spacer.Tools::safeOutput($link['label']).'</option>';
|
||||
}
|
||||
$html .= '</optgroup>';
|
||||
$html .= '</select>';
|
||||
|
||||
Reference in New Issue
Block a user