]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admin_add.php
More complete rewrite to use wrapper function isExtensionInstalledAndNewer(), some...
[mailer.git] / inc / modules / admin / what-admin_add.php
index 4f3f661ee89ec32f4e85e12cd8c5a333946bd071..aa2fa702f232062bf4dc8eb12a43a3dda4408666 100644 (file)
@@ -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 *
@@ -45,8 +46,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Check if the admin has entered title and what-php file name...
-if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet('menu')) || (!isPostRequestElementSet(('descr')))) && (isFormSent())) {
-       unsetPostRequestElement('ok');
+if (((!isPostRequestParameterSet('title')) || (!isPostRequestParameterSet('menu')) || (!isPostRequestParameterSet(('descr')))) && (isFormSent())) {
+       unsetPostRequestParameter('ok');
 } // END - if
 
 if (!isFormSent()) {
@@ -156,32 +157,32 @@ if (!isFormSent()) {
 
        // Prepare selections for template
        $content['below_selection']  = $OUT;
-       $content['what_selection']   = adminAddMenuSelectionBox('member', 'what'  , 'name');
-       $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu');
+       $content['what_selection']   = adminAddMenuSelectionBox('admin', 'what'  , 'name');
+       $content['action_selection'] = adminAddMenuSelectionBox('admin', 'action', 'menu');
 
        // Display form
        loadTemplate('admin_admin_add', false, $content);
 } elseif (!isDemoModeActive()) {
        // Insert new menu entry
-       if (isPostRequestElementSet('menu')) {
+       if (isPostRequestParameterSet('menu')) {
                // Add sub menu
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
                        array(
-                               postRequestElement('menu'),
-                               postRequestElement('name'),
-                               postRequestElement('title'),
-                               postRequestElement('descr'),
-                               bigintval(postRequestElement('sort')),
+                               postRequestParameter('menu'),
+                               postRequestParameter('name'),
+                               postRequestParameter('title'),
+                               postRequestParameter('descr'),
+                               bigintval(postRequestParameter('sort')),
                        ), __FILE__, __LINE__
                );
        } else {
                // Add main menu
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
                        array(
-                               postRequestElement('name'),
-                               postRequestElement('title'),
-                               postRequestElement('descr'),
-                               bigintval(postRequestElement('sort')),
+                               postRequestParameter('name'),
+                               postRequestParameter('title'),
+                               postRequestParameter('descr'),
+                               bigintval(postRequestParameter('sort')),
                        ), __FILE__, __LINE__
                );
        }