diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-09 20:02:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-09 20:02:42 +0000 |
commit | a4b13976775152a44f720f96319c167926397f01 (patch) | |
tree | addae2990120e325f486af253f667b4c75882612 | |
parent | 6744e3406668aee03ece6277d8f042a58d533e84 (diff) | |
download | brdo-a4b13976775152a44f720f96319c167926397f01.tar.gz brdo-a4b13976775152a44f720f96319c167926397f01.tar.bz2 |
- Ported David's taxonomy patch to Drupal CVS.
-rw-r--r-- | modules/statistics.module | 4 | ||||
-rw-r--r-- | modules/statistics/statistics.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/statistics.module b/modules/statistics.module index 1d8ad4a33..0635868ba 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -7,7 +7,7 @@ function statistics_init() { if (variable_get("statistics_enable_node_counter", 0)) { // node view counters are enabled - if (arg(0) == "node" && arg(1) == "view") { + if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) { // a node has been viewed, so updated the node's counters db_query("UPDATE statistics SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = '%s' WHERE nid = '%s'", time(), arg(2)); // if we affected 0 rows, this is the first time viewing the node @@ -23,7 +23,7 @@ function statistics_init() { $referrer = getenv("HTTP_REFERER"); $hostname = getenv("REMOTE_ADDR"); // log this page access - if (arg(0) == "node" && arg(1) == "view") { + 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()); } else { diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 1d8ad4a33..0635868ba 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -7,7 +7,7 @@ function statistics_init() { if (variable_get("statistics_enable_node_counter", 0)) { // node view counters are enabled - if (arg(0) == "node" && arg(1) == "view") { + if ((arg(0) == "node") && (arg(1) == "view") && arg(2)) { // a node has been viewed, so updated the node's counters db_query("UPDATE statistics SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = '%s' WHERE nid = '%s'", time(), arg(2)); // if we affected 0 rows, this is the first time viewing the node @@ -23,7 +23,7 @@ function statistics_init() { $referrer = getenv("HTTP_REFERER"); $hostname = getenv("REMOTE_ADDR"); // log this page access - if (arg(0) == "node" && arg(1) == "view") { + 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()); } else { |