Fix: left and top menu can't create. Now the checks are correct. GETPOST with method 3 (POST then GET).

This commit is contained in:
Christian Humpel 2022-08-21 22:33:41 +02:00
parent 9c9e1b776c
commit fbadce46c5

View File

@ -172,12 +172,12 @@ if ($action == 'add') {
$action = 'create';
$error++;
}
if (!$error && GETPOST('menuId') && GETPOST('type') == 'top') {
if (!$error && GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'top') {
setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors');
$action = 'create';
$error++;
}
if (!$error && !GETPOST('menuId') && GETPOST('type') != 'left') {
if (!$error && !GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'left') {
setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors');
$action = 'create';
$error++;