Renamed ifSqlHasZeroNums() to ifSqlHasZeroNumRows() and improved some queries.
[mailer.git] / inc / modules / admin / what-admin_add.php
index e4baa04123417350309e6557b2f4b3d3b950eaf4..d9a9a59155313607d3a6bb462d3e118e0d34c640 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -56,7 +56,7 @@ if (!isFormSent()) {
 
        // Get all available main menus
        $result = sqlQuery("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
-       if (!ifSqlHasZeroNums($result)) {
+       if (!ifSqlHasZeroNumRows($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
                while ($content = sqlFetchArray($result)) {
@@ -95,7 +95,7 @@ if (!isFormSent()) {
                foreach ($menus as $key_main => $value_main) {
                        $result = sqlQueryEscaped("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                                array($value_main), __FILE__, __LINE__);
-                       if (!ifSqlHasZeroNums($result)) {
+                       if (!ifSqlHasZeroNumRows($result)) {
                                // Init arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();