summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-02-09 17:58:56 +0000
committerDries Buytaert <dries@buytaert.net>2003-02-09 17:58:56 +0000
commitf3c093f638ea60ee191954181567d72ca2407d6c (patch)
tree4b4899afe0166d22648fe131db986ddb250b35e9
parent9281d0cdd7279b5e0e1d60c75bc38c2ae41c247a (diff)
downloadbrdo-f3c093f638ea60ee191954181567d72ca2407d6c.tar.gz
brdo-f3c093f638ea60ee191954181567d72ca2407d6c.tar.bz2
- Changed '%s' into '%d' such that an empty $user->uid is converted to 0. Requi
red for Drupal to work on new versions of PostgreSQL. Patch by James, backported to CVS by me.
-rw-r--r--modules/statistics.module4
-rw-r--r--modules/statistics/statistics.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index 4fd0c6267..91db57d0c 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -57,10 +57,10 @@ function statistics_exit() {
$hostname = getenv("REMOTE_ADDR");
// log this page access
if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) {
- db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', '%s')", arg(2), $referrer, $hostname, $user->uid, time());
+ db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%d', '%s')", arg(2), $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());
}
}
}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 4fd0c6267..91db57d0c 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -57,10 +57,10 @@ function statistics_exit() {
$hostname = getenv("REMOTE_ADDR");
// log this page access
if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) {
- db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', '%s')", arg(2), $referrer, $hostname, $user->uid, time());
+ db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%d', '%s')", arg(2), $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());
}
}
}