summaryrefslogtreecommitdiff
path: root/includes/database.pgsql.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-04-13 08:56:59 +0000
committerDries Buytaert <dries@buytaert.net>2007-04-13 08:56:59 +0000
commite6759790919d06d807eeb5546841a5a09cf3a4d6 (patch)
tree4f6a88b11559f01d852262d03f42645568c820c0 /includes/database.pgsql.inc
parentbe47ac090b3be5a13d33a75b835a755a0f4250c7 (diff)
downloadbrdo-e6759790919d06d807eeb5546841a5a09cf3a4d6.tar.gz
brdo-e6759790919d06d807eeb5546841a5a09cf3a4d6.tar.bz2
- Patch #134493 by douggreen: getting the Drupal coding standards right in core. Woot. Woot.
Diffstat (limited to 'includes/database.pgsql.inc')
-rw-r--r--includes/database.pgsql.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc
index 71723d84d..56a30ee9a 100644
--- a/includes/database.pgsql.inc
+++ b/includes/database.pgsql.inc
@@ -65,19 +65,19 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
if (isset($url['user'])) {
- $conn_string .= ' user=' . urldecode($url['user']);
+ $conn_string .= ' user='. urldecode($url['user']);
}
if (isset($url['pass'])) {
- $conn_string .= ' password=' . urldecode($url['pass']);
+ $conn_string .= ' password='. urldecode($url['pass']);
}
if (isset($url['host'])) {
- $conn_string .= ' host=' . urldecode($url['host']);
+ $conn_string .= ' host='. urldecode($url['host']);
}
if (isset($url['path'])) {
- $conn_string .= ' dbname=' . substr(urldecode($url['path']), 1);
+ $conn_string .= ' dbname='. substr(urldecode($url['path']), 1);
}
if (isset($url['port'])) {
- $conn_string .= ' port=' . urldecode($url['port']);
+ $conn_string .= ' port='. urldecode($url['port']);
}
// pg_last_error() does not return a useful error message for database
@@ -126,7 +126,7 @@ function _db_query($query, $debug = 0) {
if (variable_get('dev_query', 0)) {
$bt = debug_backtrace();
- $query = $bt[2]['function'] . "\n" . $query;
+ $query = $bt[2]['function'] ."\n". $query;
list($usec, $sec) = explode(' ', microtime());
$stop = (float)$usec + (float)$sec;
$diff = $stop - $timer;
@@ -391,7 +391,7 @@ function db_unlock_tables() {
* Check if a table exists.
*/
function db_table_exists($table) {
- return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{" . db_escape_table($table) . "}'"));
+ return db_num_rows(db_query("SELECT relname FROM pg_class WHERE relname = '{". db_escape_table($table) ."}'"));
}
/**
@@ -421,7 +421,7 @@ function db_distinct_field($table, $field, $query) {
$field_to_select = 'DISTINCT ON ('. $table .'.'. $field .") $table.$field";
// (?<!text) is a negative look-behind (no need to rewrite queries that already use DISTINCT).
$query = preg_replace('/(SELECT.*)(?:'. $table .'\.|\s)(?<!DISTINCT\()(?<!DISTINCT\('. $table .'\.)'. $field .'(.*FROM )/AUsi', '\1 '. $field_to_select .'\2', $query);
- $query = preg_replace('/(ORDER BY )(?!'.$table.'\.'.$field.')/', '\1'."$table.$field, ", $query);
+ $query = preg_replace('/(ORDER BY )(?!'. $table .'\.'. $field .')/', '\1'."$table.$field, ", $query);
return $query;
}