summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_dbi.class8
1 files changed, 3 insertions, 5 deletions
diff --git a/it_dbi.class b/it_dbi.class
index 5552c6d..18b5052 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -35,8 +35,6 @@ class it_dbi
#'keyfield' => 'ID', # Don't set to null here, filled later by _get_field_info()
'classprefix' => "",
'persistent' => false,
- 'sqllog' => false,
- 'sqltrace' => false,
);
var $_key; # Key of currently loaded record or null (public readonly)
@@ -65,7 +63,7 @@ function it_dbi($p = array(), $query = null)
$p += $dp;
# Combine our settings with user's defaults and class defaults
- $p += (array)$GLOBALS['it_dbi_defaultconfig'] + array('sqllog' => EDC('sqllog') || EDC('sqltrace'), 'sqltrace' => EDC('sqltrace'), 'db' => $GLOBALS['ULTRADB']) + $this->_defaultconfig;
+ $p += (array)$GLOBALS['it_dbi_defaultconfig'] + array('db' => $GLOBALS['ULTRADB']) + $this->_defaultconfig;
unset($this->_defaultconfig); # to shorten ED() output
$p['dbid'] = "{$p['user']}@{$p['server']}:{$p['db']}";
@@ -391,11 +389,11 @@ function query($query)
}
- if ($this->_p['sqllog'])
+ if ($GLOBALS['debug_sqllog'])
{
$end = gettimeofday();
$msec = round(($end['sec'] - $start['sec']) * 1000 + ($end['usec'] - $start['usec']) / 1000);
- it::log('sqllog', "$msec\t$query" . ($this->_p['sqltrace'] ? "\t" . it_debug::backtrace(1) : ""));
+ it::log('sqllog', "$msec\t$query" . (EDC('sqltrace') ? "\t" . it_debug::backtrace(1) : ""));
}
return $result;