diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-20 19:20:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-20 19:20:22 +0000 |
commit | 5b1e1da22efa434714986ba883b441f6a2416a96 (patch) | |
tree | 4739bb682e761a4212e8ccddebd342396b6b53a8 | |
parent | fe72ab1c225607a27cabaa1fd4667368917a58f1 (diff) | |
download | brdo-5b1e1da22efa434714986ba883b441f6a2416a96.tar.gz brdo-5b1e1da22efa434714986ba883b441f6a2416a96.tar.bz2 |
- Tidied up a SQL query.
- Changed a "&" to a "&".
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index 39bee8d8c..9e27d9cd1 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -37,7 +37,7 @@ function error_handler($errno, $message, $filename, $line, $variables) { function watchdog($type, $message, $link = NULL) { global $user; - db_query("INSERT INTO watchdog (uid, type, message, link, location, hostname, timestamp) VALUES ('$user->uid', '%s', '%s', '%s', '%s', '%s', '%s')", $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time()); + db_query("INSERT INTO watchdog (uid, type, message, link, location, hostname, timestamp) VALUES ('%d', '%s', '%s', '%s', '%s', '%s', '%s')", $user->uid, $type, $message, $link, request_uri(), getenv("REMOTE_ADDR"), time()); } function throttle($type, $rate) { @@ -390,7 +390,7 @@ function drupal_goto($url) { ** Translate & to simply & */ - $url = str_replace ("&", "&", $url); + $url = str_replace("&", "&", $url); /* ** It is advised to use "drupal_goto()" instead of PHP's "header()" as @@ -748,7 +748,7 @@ function url($url = NULL, $query = NULL) { if (isset($url)) { if (isset($query)) { - return "?q=$url&$query"; + return "?q=$url&$query"; } else { return "?q=$url"; @@ -775,7 +775,7 @@ function l($text, $url, $attributes = array(), $query = NULL) { } function field_get($string, $name) { - ereg(",$name=([^,]+)", ",$string", $regs); + ereg(",$name=([^,]+)", ", $string", $regs); return $regs[1]; } |