Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / config-functions.php
index c9925db2fca8dd72611523256df4ca8740d59476..4fd2eca37677c6b8d744826991310a860f85e0fe 100644 (file)
@@ -334,7 +334,7 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0'
                                        setConfigEntry($entry, $values[$idx]);
                                } else {
                                        // String detected
-                                       $SQL .= sprintf("`%s`='%s',", $entry, SQL_ESCAPE($values[$idx]));
+                                       $SQL .= sprintf("`%s`='%s',", $entry, sqlEscapeString($values[$idx]));
 
                                        // Set it in config as well
                                        setConfigEntry($entry, $values[$idx]);
@@ -368,15 +368,15 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0'
                setConfigEntry($entries, time());
        } else {
                // Regular entry to update
-               $SQL = sprintf("`%s`='%s'", $entries, SQL_ESCAPE($values));
+               $SQL = sprintf("`%s`='%s'", $entries, sqlEscapeString($values));
 
                // Set it in config as well
-               setConfigEntry($entries, SQL_ESCAPE($values));
+               setConfigEntry($entries, sqlEscapeString($values));
        }
 
        // Run database update
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL);
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$SQL." WHERE `config`=%s LIMIT 1",
+       sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$SQL." WHERE `config`=%s LIMIT 1",
                        array(bigintval($config)), __FUNCTION__, __LINE__);
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL=' . $SQL . ',affectedRows=' . SQL_AFFECTEDROWS());
 
@@ -402,21 +402,21 @@ function FILTER_LOAD_CONFIGURATION ($no = '0') {
                // Load config from cache
                mergeConfig($GLOBALS['cache_array']['config'][$no]);
 
-               // Count cache hits 
+               // Count cache hits
                incrementStatsEntry('cache_hits');
        } elseif ((!isExtensionActive('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
                // Load config from DB
-               $result_config = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`='%s' LIMIT 1",
+               $result_config = sqlQueryEscaped("SELECT * FROM `{?_MYSQL_PREFIX?}_config` WHERE `config`='%s' LIMIT 1",
                        array(bigintval($no)), __FUNCTION__, __LINE__);
 
                // Is the config there?
-               if (SQL_NUMROWS($result_config) == 1) {
+               if (sqlNumRows($result_config) == 1) {
                        // Get config from database
-                       mergeConfig(SQL_FETCHARRAY($result_config));
+                       mergeConfig(sqlFetchArray($result_config));
                } // END - if
 
                // Free result
-               SQL_FREERESULT($result_config);
+               sqlFreeResult($result_config);
 
                // Remember this config in the array
                $GLOBALS['cache_array']['config'][$no] = getConfigArray();