Change URL parameter to 'menu'

This commit is contained in:
Abhishek Kumar
2023-09-19 15:13:47 +05:30
parent 798701b1f9
commit a883caa718
3 changed files with 10 additions and 5 deletions

View File

@@ -44,13 +44,13 @@ if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) {
}
// For retrocompatibility with "tab" parameter
if (!isset($_GET['controller']) && isset($_GET['tab']) && is_string($_GET['tab'])) {
if (!isset($_GET['controller']) && isset($_GET['tab'])) {
$_GET['controller'] = strtolower($_GET['tab']);
}
if (!isset($_POST['controller']) && isset($_POST['tab']) && is_string($_POST['tab'])) {
if (!isset($_POST['controller']) && isset($_POST['tab'])) {
$_POST['controller'] = strtolower($_POST['tab']);
}
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']) && is_string($_REQUEST['tab'])) {
if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
}

View File

@@ -340,7 +340,7 @@ class AdminTabsControllerCore extends AdminController
{
$way = (int)(Tools::getValue('way'));
$id_tab = (int)(Tools::getValue('id'));
$positions = Tools::getValue('tab');
$positions = Tools::getValue('menu');
// when changing positions in a tab sub-list, the first array value is empty and needs to be removed
if (!$positions[0]) {

View File

@@ -139,7 +139,12 @@ function initTableDnD(table)
params['page'] = parseInt($('input[name=page]').val());
params['selected_pagination'] = parseInt($('input[name=selected_pagination]').val());
var data = $.tableDnD.serialize().replace(/table-/g, '');
var data = '';
if (tableId == 'tab') {
data = $.tableDnD.serialize().replace(/table-tab/g, 'menu');
} else {
data = $.tableDnD.serialize().replace(/table-/g, '');
}
if ((tableId == 'category') && (data.indexOf('_0&') != -1))
data += '&found_first=1';
$.ajax({