]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-adminedit.php
Suffix '_enabled' in config entries is deprecated
[mailer.git] / inc / modules / admin / what-adminedit.php
index d418ba4fc90185ba815c51260e87a1e4e7a4a988..00764f8505834c2312b27a41d698d0601b9929bb 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -45,9 +45,9 @@ addYouAreHereLink('admin', __FILE__);
 
 // Do we edit/delete/change main menus or sub menus?
 $AND = "(`what` = '' OR `what` IS NULL)"; $subMenu = '';
-if (isGetRequestParameterSet('sub')) {
-       $AND = sprintf("`action`='%s' AND `what` != '' AND `what` IS NOT NULL", getRequestParameter('sub'));
-       $subMenu = getRequestParameter('sub');
+if (isGetRequestElementSet('sub')) {
+       $AND = sprintf("`action`='%s' AND `what` != '' AND `what` IS NOT NULL", getRequestElement('sub'));
+       $subMenu = getRequestElement('sub');
 } // END - if
 
 // List all menu points and make them editable
@@ -57,7 +57,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        $content['sub'] = $subMenu;
        $content['chk'] = countPostSelection();
        $count = '0'; $OUT = '';
-       foreach (postRequestParameter('sel') as $sel => $confirm) {
+       foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
                        $result = SQL_QUERY_ESC("SELECT `title`,`action`,`what`,`descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
@@ -107,7 +107,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
 
        // Del menu entries with or without confirmation
        $count = '0'; $OUT = '';
-       foreach (postRequestParameter('sel') as $sel => $confirm) {
+       foreach (postRequestElement('sel') as $sel => $confirm) {
                if ($confirm == 1) {
                        $count++;
                        $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
@@ -143,9 +143,9 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
        loadTemplate('admin_delete_admin_menu', false, $content);
 } elseif ((isFormSent()) && (!isDemoModeActive())) {
        // An action is done...
-       switch (postRequestParameter('ok')) {
+       switch (postRequestElement('ok')) {
                case 'edit': // Edit menu
-                       foreach (postRequestParameter('sel') as $sel => $menu) {
+                       foreach (postRequestElement('sel') as $sel => $menu) {
                                // Secure id
                                $sel = bigintval($sel);
 
@@ -163,9 +163,9 @@ WHERE
 LIMIT 1",
                                array(
                                        $menu,
-                                       postRequestParameter('sel_action', $sel),
-                                       postRequestParameter('sel_what', $sel),
-                                       postRequestParameter('sel_desc', $sel),
+                                       postRequestElement('sel_action', $sel),
+                                       postRequestElement('sel_what', $sel),
+                                       postRequestElement('sel_desc', $sel),
                                        $sel,
                                ), __FILE__, __LINE__);
                        }
@@ -175,7 +175,7 @@ LIMIT 1",
                        break;
 
                case 'delete': // Delete menu
-                       foreach (postRequestParameter('sel') as $sel => $menu) {
+                       foreach (postRequestElement('sel') as $sel => $menu) {
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1",
                                        array(bigintval($sel)), __FILE__, __LINE__);
                        } // END - foreach
@@ -185,8 +185,8 @@ LIMIT 1",
                        break;
 
                default: // Unexpected action
-                       logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok')));
-                       displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestParameter('ok') . '%}');
+                       logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok')));
+                       displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestElement('ok') . '%}');
                        break;
        } // END - switch
 } else {
@@ -224,7 +224,7 @@ LIMIT 1",
                        }
 
                        // Add more data to $content
-                       $content['mode'] = 'admin';
+                       $content['do'] = 'admin';
 
                        // Load row template and switch colors
                        $OUT .= loadTemplate('admin_menu_overview_row', true, $content);