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:
parent
9c9e1b776c
commit
fbadce46c5
@ -172,12 +172,12 @@ if ($action == 'add') {
|
|||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (!$error && GETPOST('menuId') && GETPOST('type') == 'top') {
|
if (!$error && GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'top') {
|
||||||
setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors');
|
setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if (!$error && !GETPOST('menuId') && GETPOST('type') != 'left') {
|
if (!$error && !GETPOST('menuId', 'alphanohtml', 3) && GETPOST('type') == 'left') {
|
||||||
setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors');
|
setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user