X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-guest_add.php;h=a9ceac643ff5db55742ab3750be738801c974e06;hb=c2245ee6923f35880d1df7ef0d9b78fa26ae25e7;hp=7b9475afb560d9661f73bb4f04fe7d7ffe3419f0;hpb=e6785b4a4845d7a885b0e9c6dac517c6867940e1;p=mailer.git diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 7b9475afb5..a9ceac643f 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu')))) && (IS_FORM_SENT())) { +if (((!REQUEST_ISSET_POST('title')) || (!REQUEST_ISSET_POST(('menu')))) && (isFormSent())) { // Abort adding the menu entry REQUEST_UNSET_POST('ok'); -} +} // END - if -if (!IS_FORM_SENT()) { +if (!isFormSent()) { // Create arrays $menus = array(); $titles = array(); $below = array(); @@ -59,6 +59,7 @@ if (!IS_FORM_SENT()) { $result = SQL_QUERY("SELECT action, title, sort FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort`", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Read menu structure + // @TODO Cant this be rewritten? while ($content = SQL_FETCHARRAY($result)) { // Menu actions $menus[] = $content['action']; @@ -68,7 +69,7 @@ if (!IS_FORM_SENT()) { // Below this menu point should the new be added so we simply increase the sort value by 1 :-) $below[] = $content['sort'] + 1; - } + } // END - while // Free memory SQL_FREERESULT($result); @@ -96,7 +97,7 @@ if (!IS_FORM_SENT()) { $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", - array($value_main), __FILE__, __LINE__); + array($value_main), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Initialize arrays $menus[$value_main] = array(); @@ -141,18 +142,13 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", $OUT = "