summaryrefslogtreecommitdiff
path: root/includes/database.pgsql.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-06-22 20:19:58 +0000
committerDries Buytaert <dries@buytaert.net>2005-06-22 20:19:58 +0000
commit5c8843704c2b953d5fb790ca084c700ea685d252 (patch)
tree40b77faa12c9676695cd57bbd18c628d3db5bcce /includes/database.pgsql.inc
parentf3a9a99570b1e9d7a929ee4a2f6495b6b26335d2 (diff)
downloadbrdo-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.pgsql.inc')
-rw-r--r--includes/database.pgsql.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc
index 15eda4d83..9e4ecf21b 100644
--- a/includes/database.pgsql.inc
+++ b/includes/database.pgsql.inc
@@ -36,15 +36,20 @@ function db_connect($url) {
function _db_query($query, $debug = 0) {
global $active_db, $last_result;
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;
}
$last_result = pg_query($active_db, $query);
- if (variable_get('dev_query', 0)) {
+ if ($dev_query) {
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $timer;