]> git.mxchange.org Git - mailer.git/blobdiff - inc/fix_menu.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / fix_menu.php
index 99e319b1b7a2908221c9eeda9186a6fdcd682dfe..2aad72e31f2ca9070466229375dd7f9186e6a0fe 100644 (file)
@@ -43,14 +43,14 @@ if (!defined('__SECURITY')) {
 // Get all menus
 foreach (array('guest','member','admin') as $menu) {
        // Query it
-       $result = SQL_QUERY_ESC("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC,`what` ASC",
+       $result = sqlQueryEscaped("SELECT `action`, `what` FROM `{?_MYSQL_PREFIX?}_%s_menu` ORDER BY `action` ASC,`what` ASC",
                array($menu), __FILE__, __LINE__);
 
        // Init array
        $menus = array();
 
        // Load all entries
-       while ($entry = SQL_FETCHARRAY($result)) {
+       while ($entry = sqlFetchArray($result)) {
                // Is the menu entry set?
                if (!isset($menus['menu'][$entry['action']][$entry['what']])) {
                        // Not found
@@ -71,7 +71,7 @@ foreach (array('guest','member','admin') as $menu) {
                                // Remove all except one
                                if (is_null($entry['what'])) {
                                        // Main menu is double
-                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s",
+                                       sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what` IS NULL LIMIT %s",
                                                array(
                                                        $menu,
                                                        $entry['action'],
@@ -79,7 +79,7 @@ foreach (array('guest','member','admin') as $menu) {
                                                ), __FILE__, __LINE__);
                                } else {
                                        // Sub menu is double
-                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s",
+                                       sqlQueryEscaped("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `action`='%s' AND `what`='%s' LIMIT %s",
                                                array(
                                                        $menu,
                                                        $entry['action'],
@@ -92,7 +92,7 @@ foreach (array('guest','member','admin') as $menu) {
        } // END - while
 
        // Free result
-       SQL_FREERESULT($result);
+       sqlFreeResult($result);
 
        // Init sqls
        initSqls();