- The statistics module would sometimes mistake a non-node ID with that
of a node. Thanks David and Jeremy.4.2.x
parent
8a63646576
commit
2da18e8d0c
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue