X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-memedit.php;h=3194832be964010a38f295f873cbbe7bb8aadee6;hb=8a6e423d71bdd68443026b4fe7466f7164625c87;hp=0370abeeb87714a402585aebfbda431e07ce4a88;hpb=57227d33e870ec5cd271209c4a978a52b45c2dd6;p=mailer.git diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index 0370abeeb8..3194832be9 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -18,6 +18,7 @@ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -53,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(); @@ -96,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(); @@ -182,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", @@ -199,8 +203,12 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDem SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", array(postRequestParameter('visible', $sel), postRequestParameter('locked', $sel), $sel), __FILE__, __LINE__); break; + + default: // Unexpected action + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_UNKNOWN_OKAY', postRequestParameter('ok'))); + break; } // END - switch - break; } // END - foreach // Load template