Remove unneeded check
This commit is contained in:
+5
-12
@@ -848,11 +848,9 @@ class Ps_MainMenu extends Module implements WidgetInterface
|
||||
$join_shop = '';
|
||||
$where_shop = '';
|
||||
|
||||
if (Tools::version_compare(_PS_VERSION_, '1.6.0.12', '>=') == true) {
|
||||
$join_shop = ' INNER JOIN `' . _DB_PREFIX_ . 'cms_category_shop` cs
|
||||
ON (bcp.`id_cms_category` = cs.`id_cms_category`)';
|
||||
$where_shop = ' AND cs.`id_shop` = ' . (int) $id_shop . ' AND cl.`id_shop` = ' . (int) $id_shop;
|
||||
}
|
||||
$join_shop = ' INNER JOIN `' . _DB_PREFIX_ . 'cms_category_shop` cs
|
||||
ON (bcp.`id_cms_category` = cs.`id_cms_category`)';
|
||||
$where_shop = ' AND cs.`id_shop` = ' . (int) $id_shop . ' AND cl.`id_shop` = ' . (int) $id_shop;
|
||||
|
||||
if ($recursive === false) {
|
||||
$sql = 'SELECT bcp.`id_cms_category`, bcp.`id_parent`, bcp.`level_depth`, bcp.`active`, bcp.`position`, cl.`name`, cl.`link_rewrite`
|
||||
@@ -893,11 +891,6 @@ class Ps_MainMenu extends Module implements WidgetInterface
|
||||
$id_shop = ($id_shop !== false) ? (int) $id_shop : (int) Context::getContext()->shop->id;
|
||||
$id_lang = $id_lang ? (int) $id_lang : (int) Context::getContext()->language->id;
|
||||
|
||||
$where_shop = '';
|
||||
if (Tools::version_compare(_PS_VERSION_, '1.6.0.12', '>=') == true) {
|
||||
$where_shop = ' AND cl.`id_shop` = ' . (int) $id_shop;
|
||||
}
|
||||
|
||||
$sql = 'SELECT c.`id_cms`, cl.`meta_title`, cl.`link_rewrite`
|
||||
FROM `' . _DB_PREFIX_ . 'cms` c
|
||||
INNER JOIN `' . _DB_PREFIX_ . 'cms_shop` cs
|
||||
@@ -906,8 +899,8 @@ class Ps_MainMenu extends Module implements WidgetInterface
|
||||
ON (c.`id_cms` = cl.`id_cms`)
|
||||
WHERE c.`id_cms_category` = ' . (int) $id_cms_category . '
|
||||
AND cs.`id_shop` = ' . (int) $id_shop . '
|
||||
AND cl.`id_lang` = ' . (int) $id_lang .
|
||||
$where_shop . '
|
||||
AND cl.`id_lang` = ' . (int) $id_lang . '
|
||||
AND cl.`id_shop` = ' . (int) $id_shop . '
|
||||
AND c.`active` = 1
|
||||
ORDER BY `position`';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user