Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 2.3.3 #75

Merged
merged 12 commits into from
Jan 3, 2024
Prev Previous commit
Next Next commit
Remove unneeded check
  • Loading branch information
Hlavtox authored Dec 30, 2023
commit e51c32556b8d701cc4020f30cbcdee456c9609cf
17 changes: 5 additions & 12 deletions ps_mainmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,9 @@ protected function getCMSCategories($recursive = false, $parent = 1, $id_lang =
$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`
Expand Down Expand Up @@ -893,11 +891,6 @@ protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = fa
$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
Expand All @@ -906,8 +899,8 @@ protected function getCMSPages($id_cms_category, $id_shop = false, $id_lang = fa
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`';

Expand Down