summaryrefslogtreecommitdiff
path: root/modules/statistics/statistics.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-11-26 19:39:07 +0000
committerDries Buytaert <dries@buytaert.net>2002-11-26 19:39:07 +0000
commit8fa5440bb4c01e647301422d9bf83f9f6eda8978 (patch)
treeea34ac9280bf8bc176be53816ee6cf1aab909125 /modules/statistics/statistics.module
parent51778ef1b34d985c5f3eeb5a3236218f01799d4f (diff)
downloadbrdo-8fa5440bb4c01e647301422d9bf83f9f6eda8978.tar.gz
brdo-8fa5440bb4c01e647301422d9bf83f9f6eda8978.tar.bz2
- Applied Jeremy's statistics module patches:
+ Fixed "recent users" title/timestamps. + Added statistics_node_delete() function. - Applied Jeremy's node module patches: + Added call to statistics_node_delete(). + Fixed call to taxonomy_node_delete().
Diffstat (limited to 'modules/statistics/statistics.module')
-rw-r--r--modules/statistics/statistics.module9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index b085f2b3d..8fbdfe0e7 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -341,7 +341,7 @@ function statistics_admin_accesslog_table($type, $id) {
}
else {
/* retrieve recent access logs for all users */
- $result = db_query("SELECT nid, url, hostname, uid, MAX(timestamp) AS max_timestamp FROM accesslog WHERE uid <> '0' GROUP BY uid ORDER BY max_timestamp DESC LIMIT %s", $limit1);
+ $result = db_query("SELECT nid, url, hostname, uid, MAX(timestamp) AS timestamp FROM accesslog WHERE uid <> '0' GROUP BY uid ORDER BY timestamp DESC LIMIT %s", $limit1);
}
}
else if ($type == 2) {
@@ -533,7 +533,7 @@ function statistics_admin_displaylog() {
$output .= "<br />";
- $output .= "<h3>Recent users</h3>\n";
+ $output .= "<h3>Recent user logs</h3>\n";
$output .= statistics_admin_accesslog_table(1, 0);
$output .= "<br />";
@@ -908,6 +908,11 @@ function statistics_summary($dbfield, $dbrows) {
}
+// clean up statistics table when node is deleted
+function statistics_node_delete($nid) {
+ db_query("DELETE FROM statistics WHERE nid = '%d'", $nid);
+}
+
/* internal throttle function - do not call from other modules */
function throttle_update($recent_activity) {
$throttle = throttle_status();