- The statistics module would sometimes mistake a non-node ID with that

of a node.  Thanks David and Jeremy.
4.2.x
Dries Buytaert 2003-01-04 23:38:58 +00:00
parent 8a63646576
commit 2da18e8d0c
2 changed files with 12 additions and 2 deletions

View File

@ -23,7 +23,12 @@ function statistics_init() {
$referrer = getenv("HTTP_REFERER");
$hostname = getenv("REMOTE_ADDR");
// log this page access
db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', '%s')", $id, $referrer, $hostname, $user->uid, time());
if (isset($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());
}
else {
db_query("INSERT INTO accesslog (url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s')", $referrer, $hostname, $user->uid, time());
}
}
/*

View File

@ -23,7 +23,12 @@ function statistics_init() {
$referrer = getenv("HTTP_REFERER");
$hostname = getenv("REMOTE_ADDR");
// log this page access
db_query("INSERT INTO accesslog (nid, url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s', '%s')", $id, $referrer, $hostname, $user->uid, time());
if (isset($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());
}
else {
db_query("INSERT INTO accesslog (url, hostname, uid, timestamp) values('%s', '%s', '%s', '%s')", $referrer, $hostname, $user->uid, time());
}
}
/*