diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-06-22 20:19:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-06-22 20:19:58 +0000 |
commit | 5c8843704c2b953d5fb790ca084c700ea685d252 (patch) | |
tree | 40b77faa12c9676695cd57bbd18c628d3db5bcce /includes/database.mysql.inc | |
parent | f3a9a99570b1e9d7a929ee4a2f6495b6b26335d2 (diff) | |
download | brdo-5c8843704c2b953d5fb790ca084c700ea685d252.tar.gz brdo-5c8843704c2b953d5fb790ca084c700ea685d252.tar.bz2 |
- Patch #18213 by chx: boostrap system. Modified to work with HEAD, tidied
up the documentation a little.
chx: can you double-check whether the global $conf variable is secure?
(That is, make sure it can't be send using the URL or something.)
Diffstat (limited to 'includes/database.mysql.inc')
-rw-r--r-- | includes/database.mysql.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index 786a1dfd8..78bd24656 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -47,15 +47,20 @@ function db_connect($url) { function _db_query($query, $debug = 0) { global $active_db; global $queries; + static $dev_query; - if (variable_get('dev_query', 0)) { + if (!isset($dev_query)) { + $dev_query = function_exists('dev_query') ? variable_get('dev_query', 0) : $GLOBALS['conf']['dev_query']; + } + + if ($dev_query) { list($usec, $sec) = explode(' ', microtime()); $timer = (float)$usec + (float)$sec; } $result = mysql_query($query, $active_db); - if (variable_get('dev_query', 0)) { + if ($dev_query) { list($usec, $sec) = explode(' ', microtime()); $stop = (float)$usec + (float)$sec; $diff = $stop - $timer; |