X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=3194832be964010a38f295f873cbbe7bb8aadee6;hb=8a6e423d71bdd68443026b4fe7466f7164625c87;hp=0fb06cffbd0d2fed4307260273a9db7d151e9007;hpb=09f5758c42a33a56bdd461c946ffe759a59c54aa;p=mailer.git diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 0fb06cffbd..3194832be9 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -54,7 +54,7 @@ if (isGetRequestParameterSet('sub')) { } // END - if // List all menu points and make them editable -if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Edit menu entries $content['sub'] = $SUB; $content['chk'] = countPostSelection(); @@ -97,7 +97,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDem // Load template loadTemplate('admin_mmenu_edit', false, $content); -} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isFormSent('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $SUB; $content['chk'] = countPostSelection(); @@ -183,8 +183,11 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDem // An act is done... foreach (postRequestParameter('sel') as $sel => $menu) { $AND = "(`what` = '' OR `what` IS NULL)"; + $sel = bigintval($sel); - if (!empty($SUB)) $AND = "`action`='".$SUB."'"; + + if (!empty($SUB)) $AND = "`action`='" . $SUB . "'"; + switch (postRequestParameter('ok')) { case 'edit': // Edit menu SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",