summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-02-09 17:59:15 (GMT)
committer Dries Buytaert2003-02-09 17:59:15 (GMT)
commit31d7c8cbe106138226645f6ec72be743b10e729f (patch)
treee3d76717331b478a72dad822b3afcf4c49d885b7
parent83d5c16cd1e26d2f4a2cfb5998ab67db17fdcc1c (diff)
- Changed '%s' into '%d' such that an empty $user->uid is converted to 0. Required for Drupal to work on new versions of PostgreSQL. Patch by James.
-rw-r--r--modules/statistics.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index f2eb6c5..001d545 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -24,10 +24,10 @@ function statistics_init() {
$hostname = getenv("REMOTE_ADDR");
// log this page access
if (!empty($id) && empty($mod)) {
- db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', '%s')", $id, $referrer, $hostname, $user->uid, time());
+ db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%d', '%s')", $id, $referrer, $hostname, $user->uid, time());
}
else {
- db_query("INSERT INTO accesslog (url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s')", $referrer, $hostname, $user->uid, time());
+ db_query("INSERT INTO accesslog (url, hostname, uid, timestamp) values('%s', '%s', '%d', '%s')", $referrer, $hostname, $user->uid, time());
}
}