Merge pull request #21819 from Humml87/develop_Fix_Create_left_menu

Fix: left and top menu can't create. Now the checks are correct.
This commit is contained in:
Laurent Destailleur 2022-08-22 10:50:08 +02:00 committed by GitHub
commit 2602f9d4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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++;