Not this turned on...
[mailer.git] / inc / db / lib-mysql3.php
index 63978b15495d695d52460a48f231554ab932bb57..c7cc26c7fae8ee02da7c98dd0d3e0e6d7f889995 100644 (file)
@@ -106,7 +106,7 @@ Query string:<br />
        incrementConfigEntry('sql_count');
 
        // Debug output
-       if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (isConfigEntrySet('DEBUG_SQL')) && (getConfig('DEBUG_SQL') == 'Y')) {
+       if ((getOutputMode() != 1) && (isDebugModeEnabled()) && (isSqlDebuggingEnabled())) {
                //
                // Debugging stuff...
                //
@@ -201,7 +201,7 @@ function SQL_FETCHARRAY ($res, $nr=0, $remove_numerical=true) {
                // Return row
                return $row;
        } else {
-               // Return a false here...
+               // Return a false, else some loops would go endless...
                return false;
        }
 }
@@ -225,7 +225,7 @@ function SQL_CONNECT ($host, $login, $password, $F, $L) {
        SQL_SET_LINK($connect);
 
        // Destroy cache
-       unset($GLOBALS['sql_link_res']);
+       unset($GLOBALS['is_sql_link_up']);
 }
 
 // SQL select database
@@ -252,7 +252,7 @@ function SQL_CLOSE ($F, $L) {
        SQL_SET_LINK(null);
 
        // Destroy cache
-       unset($GLOBALS['sql_link_res']);
+       unset($GLOBALS['is_sql_link_up']);
 
        // Return the result
        return $close;
@@ -530,15 +530,15 @@ function SQL_IS_LINK_UP () {
        $linkUp = false;
 
        // Do we have cached this?
-       if (isset($GLOBALS['sql_link_res'])) {
+       if (isset($GLOBALS['is_sql_link_up'])) {
                // Then use this
-               $linkUp = $GLOBALS['sql_link_res'];
+               $linkUp = $GLOBALS['is_sql_link_up'];
        } else {
                // Get it
                $linkUp = is_resource(SQL_GET_LINK());
 
                // And cache it
-               $GLOBALS['sql_link_res'] = $linkUp;
+               $GLOBALS['is_sql_link_up'] = $linkUp;
        }
 
        // Return the result