diff --git a/classes/Form/ConfigurationForm.php b/classes/Form/ConfigurationForm.php index 8622261..2c50f5d 100644 --- a/classes/Form/ConfigurationForm.php +++ b/classes/Form/ConfigurationForm.php @@ -20,7 +20,6 @@ namespace PrestaShop\Module\Ps_Googleanalytics\Form; -use AdminController; use Configuration; use Context; use HelperForm; @@ -53,7 +52,11 @@ public function generate() $helper->module = $this->module; $helper->name_controller = $this->module->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); - $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->module->name; + $helper->currentIndex = Context::getContext()->link->getAdminLink('AdminModules', true, [], [ + 'configure' => $this->module->name, + 'tab_module' => $this->module->tab, + 'module_name' => $this->module->name, + ]); // Language $helper->default_form_language = $default_lang; @@ -61,17 +64,21 @@ public function generate() // Title and toolbar $helper->title = $this->module->displayName; - $helper->show_toolbar = true; // false -> remove toolbar - $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen. + $helper->show_toolbar = true; // false -> remove toolbar + $helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen. $helper->submit_action = 'submit' . $this->module->name; $helper->toolbar_btn = [ 'save' => [ 'desc' => $this->module->getTranslator()->trans('Save', [], 'Modules.Googleanalytics.Admin'), - 'href' => AdminController::$currentIndex . '&configure=' . $this->module->name . '&save=' . $this->module->name . - '&token=' . $helper->token, + 'href' => Context::getContext()->link->getAdminLink('AdminModules', true, [], [ + 'configure' => $this->module->name, + 'tab_module' => $this->module->tab, + 'module_name' => $this->module->name, + 'save' => $this->module->name, + ]), ], 'back' => [ - 'href' => AdminController::$currentIndex . '&token=' . $helper->token, + 'href' => Context::getContext()->link->getAdminLink('AdminModules', true), 'desc' => $this->module->getTranslator()->trans('Back to list', [], 'Modules.Googleanalytics.Admin'), ], ]; diff --git a/composer.lock b/composer.lock index e73ef51..69628c9 100644 --- a/composer.lock +++ b/composer.lock @@ -2010,26 +2010,23 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2073,7 +2070,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -2089,20 +2086,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v5.4.28", + "version": "v5.4.46", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", - "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "url": "https://api.github.com/repos/symfony/process/zipball/01906871cb9b5e3cf872863b91aba4ec9767daf4", + "reference": "01906871cb9b5e3cf872863b91aba4ec9767daf4", "shasum": "" }, "require": { @@ -2135,7 +2132,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.28" + "source": "https://github.com/symfony/process/tree/v5.4.46" }, "funding": [ { @@ -2151,7 +2148,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:36:04+00:00" + "time": "2024-11-06T09:18:28+00:00" }, { "name": "symfony/service-contracts", @@ -2308,5 +2305,5 @@ "php": ">=7.1.3" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config.xml b/config.xml index 7d11231..8976d9a 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ ps_googleanalytics - + diff --git a/ps_googleanalytics.php b/ps_googleanalytics.php index 3325f7b..f2a48eb 100644 --- a/ps_googleanalytics.php +++ b/ps_googleanalytics.php @@ -47,7 +47,7 @@ public function __construct() { $this->name = 'ps_googleanalytics'; $this->tab = 'analytics_stats'; - $this->version = '5.0.2'; + $this->version = '5.0.3'; $this->ps_versions_compliancy = ['min' => '1.7.7', 'max' => _PS_VERSION_]; $this->author = 'PrestaShop'; $this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';