]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-mem_add.php
Some code cosmetics and fixes
[mailer.git] / inc / modules / admin / what-mem_add.php
index 57ee9229e168f2f5c46f9d0d07b4821ed96ffb4c..61be3eca8ef407a730a3e8214325a240a0a6b997 100644 (file)
@@ -60,7 +60,7 @@ if (!isFormSent()) {
        // Get all available main menus
        $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC",
                __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
                while ($content = SQL_FETCHARRAY($result)) {
@@ -101,7 +101,7 @@ if (!isFormSent()) {
                foreach ($menus as $key_main => $value_main) {
                        $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`",
                        array($value_main), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) > 0) {
+                       if (!SQL_HASZERONUMS($result)) {
                                // Initialize arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();
@@ -191,7 +191,7 @@ if (!isFormSent()) {
                                bigintval(postRequestParameter('sort')),
                        ), __FILE__, __LINE__);
        }
-       loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED'));
+       loadTemplate('admin_settings_saved', false, '{--SETTINGS_SAVED');
 } else {
        // Demo mode!
        loadTemplate('admin_settings_saved', false, '{--SETTINGS_NOT_SAVED--}');