From fec5957774f1cf779ab2af7cdbe835160e0a1a57 Mon Sep 17 00:00:00 2001 From: Touxten <156076965+Touxten@users.noreply.github.com> Date: Thu, 24 Jul 2025 10:44:57 +0200 Subject: [PATCH 1/8] Update ps_mainmenu.php --- ps_mainmenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index db89d8b..bbf3327 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1432,7 +1432,7 @@ public function renderList() $helper->module = $this; $helper->title = $this->trans('Link list', [], 'Modules.Mainmenu.Admin'); $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name; return $helper->generateList($links, $fields_list); } From 622449a6179732cb2483ada851eb78096fe6efb8 Mon Sep 17 00:00:00 2001 From: Touxten <156076965+Touxten@users.noreply.github.com> Date: Fri, 25 Jul 2025 13:51:19 +0200 Subject: [PATCH 2/8] False to true --- ps_mainmenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index bbf3327..1fa1889 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1432,7 +1432,7 @@ public function renderList() $helper->module = $this; $helper->title = $this->trans('Link list', [], 'Modules.Mainmenu.Admin'); $helper->token = Tools::getAdminTokenLite('AdminModules'); - $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', true) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name; return $helper->generateList($links, $fields_list); } From 5d8c64aa4ec8847dad06d8673a657b17dbca5cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Wed, 29 Oct 2025 16:51:00 +0100 Subject: [PATCH 3/8] Update ps_mainmenu.php --- ps_mainmenu.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index 1fa1889..403936e 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1116,8 +1116,11 @@ public function renderForm() $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $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', true, [], [ + 'configure' => $this->name, + 'tab_module' => $this->tab, + 'module_name' => $this->name, + ]); $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = [ 'languages' => $this->context->controller->getLanguages(), From ee73d5660969d3680ca78f827d899a03ec121e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Wed, 29 Oct 2025 16:52:03 +0100 Subject: [PATCH 4/8] Update ps_mainmenu.php --- ps_mainmenu.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index 403936e..f4e690f 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1116,7 +1116,7 @@ public function renderForm() $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $helper->module = $this; $helper->identifier = $this->identifier; - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], [ + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false, [], [ 'configure' => $this->name, 'tab_module' => $this->tab, 'module_name' => $this->name, @@ -1203,8 +1203,11 @@ public function renderAddForm() $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->default_form_language = (int) $this->context->language->id; From 6bb93d87c7376193d87e3eec9e9396853bde87fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Wed, 29 Oct 2025 16:53:40 +0100 Subject: [PATCH 5/8] Update ps_mainmenu.php --- ps_mainmenu.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index f4e690f..121bdab 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1438,7 +1438,11 @@ public function renderList() $helper->module = $this; $helper->title = $this->trans('Link list', [], 'Modules.Mainmenu.Admin'); $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], [ + 'configure' => $this->name, + 'tab_module' => $this->tab, + 'module_name' => $this->name, + ]); return $helper->generateList($links, $fields_list); } From 23f5c48f9325971ab97c2e484bd28b3721b154d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Wed, 29 Oct 2025 17:43:15 +0100 Subject: [PATCH 6/8] Refactor currentIndex assignment for consistency --- ps_mainmenu.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index 121bdab..5560060 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1116,11 +1116,7 @@ public function renderForm() $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $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 = [ 'languages' => $this->context->controller->getLanguages(), @@ -1203,11 +1199,7 @@ public function renderAddForm() $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->default_form_language = (int) $this->context->language->id; @@ -1438,11 +1430,7 @@ public function renderList() $helper->module = $this; $helper->title = $this->trans('Link list', [], 'Modules.Mainmenu.Admin'); $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], [ - 'configure' => $this->name, - 'tab_module' => $this->tab, - 'module_name' => $this->name, - ]); + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], ['configure' => $this->name, 'tab_module' => $this->tab, 'module_name' => $this->name]); return $helper->generateList($links, $fields_list); } From 02aebeecfba1cbea7cae0b0c73c7c0016b926fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hlav=C3=A1=C4=8Dek?= Date: Thu, 30 Oct 2025 16:00:03 +0100 Subject: [PATCH 7/8] Fix CS --- ps_mainmenu.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ps_mainmenu.php b/ps_mainmenu.php index 5560060..e183f74 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -1116,7 +1116,7 @@ public function renderForm() $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; $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 = [ 'languages' => $this->context->controller->getLanguages(), @@ -1199,7 +1199,7 @@ public function renderAddForm() $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->default_form_language = (int) $this->context->language->id; @@ -1430,7 +1430,7 @@ public function renderList() $helper->module = $this; $helper->title = $this->trans('Link list', [], 'Modules.Mainmenu.Admin'); $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], ['configure' => $this->name, 'tab_module' => $this->tab, 'module_name' => $this->name]); + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', true, [], ['configure' => $this->name, 'tab_module' => $this->tab, 'module_name' => $this->name]); return $helper->generateList($links, $fields_list); } From 5bb7cfad44b5c1ee6a6542e0c6bea65a5dfb584d Mon Sep 17 00:00:00 2001 From: Thomas Nabord Date: Thu, 30 Oct 2025 16:09:51 +0000 Subject: [PATCH 8/8] Bump to v2.3.6 --- config.xml | 2 +- ps_mainmenu.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index c5e449e..464f49b 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ ps_mainmenu - + diff --git a/ps_mainmenu.php b/ps_mainmenu.php index db89d8b..93159be 100644 --- a/ps_mainmenu.php +++ b/ps_mainmenu.php @@ -69,7 +69,7 @@ public function __construct() { $this->name = 'ps_mainmenu'; $this->tab = 'front_office_features'; - $this->version = '2.3.5'; + $this->version = '2.3.6'; $this->author = 'PrestaShop'; $this->imageFiles = null;