New extension added, ext-uberwach rewritten (unfinished), some fixes
[mailer.git] / inc / db / lib-mysql3.php
index e11f335446711f138efd577d25edb2e31caa661e..a5b6d67c78624631f7993732ad1a4034d68f4137 100644 (file)
@@ -104,7 +104,7 @@ Query string:<br />
        incrementConfigEntry('sql_count');
 
        // Debug output
-       if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
+       if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (isConfigEntrySet('DEBUG_SQL')) && (getConfig('DEBUG_SQL') == 'Y')) {
                //
                // Debugging stuff...
                //
@@ -119,12 +119,12 @@ Query string:<br />
        } // END - if
 
        // Count DB hits
-       if (!isStatsEntrySet('db_hits_run')) {
+       if (!isStatsEntrySet('db_hits')) {
                // Count in dummy variable
-               setStatsEntry('db_hits_run', 1);
+               setStatsEntry('db_hits', 1);
        } else {
                // Count to config array
-               incrementStatsEntry('db_hits_run');
+               incrementStatsEntry('db_hits');
        }
 
        // Return the result
@@ -252,9 +252,6 @@ function SQL_CLOSE ($F, $L) {
        // Destroy cache
        unset($GLOBALS['sql_link_res']);
 
-       // Move stats
-       incrementStatsEntry('db_hits', getStatsEntry('db_hits_run'));
-
        // Return the result
        return $close;
 }