]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-memedit.php
SQL_FETCHROW()->SQL_FETCHARRAY() and other improvements
[mailer.git] / inc / modules / admin / what-memedit.php
index 0fb06cffbd0d2fed4307260273a9db7d151e9007..3194832be964010a38f295f873cbbe7bb8aadee6 100644 (file)
@@ -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",