'what','action','module' and 'output_mode' wrapped into functions (WARNUNG: Code...
[mailer.git] / inc / db / lib-mysql3.php
index b62e9132845f16edf451cb6ad6cafffd6a83132c..ccdfd8e9f7b5121fedc5b16ca3fccb84ba325178 100644 (file)
@@ -90,14 +90,14 @@ Query string:<br />
 
        // Debug output
        //* DEBUG: */ print "Query=<pre>".$sql_string."</pre>, affected=<strong>".SQL_AFFECTEDROWS()."</strong>, numrows=<strong>".SQL_NUMROWS($result)."</strong><br />\n";
-       if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
+       if ((getOutputMode() != '1') && (getOutputMode() != '-1') && (isDebugModeEnabled()) && (getConfig('DEBUG_SQL') == 'Y')) {
                //
                // Debugging stuff...
                //
                $fp = fopen(constant('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!");
                if (!isset($GLOBALS['sql_first_entry'])) {
                        // Write first entry
-                       fwrite($fp, 'Module=' . $GLOBALS['module'] . "\n");
+                       fwrite($fp, 'Module=' . getModule() . "\n");
                        $GLOBALS['sql_first_entry'] = true;
                } // END - if
                fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace("\r", '', str_replace("\n", " ", $sql_string))."\n");