From 07ab3915c46f06f948c929d3871ac4a10c3163f3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 17 May 2003 19:57:52 +0000 Subject: - Only export the "who is online" block when the access log is enabled. Patch by Al. Fixed bug #1692. - Only export the "top nodes" block when the node counters are enabled. --- modules/statistics.module | 8 ++++++-- modules/statistics/statistics.module | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/statistics.module b/modules/statistics.module index f227baabf..b5ca7a9a5 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -812,8 +812,12 @@ function statistics_get($nid) { /* Block hook */ function statistics_block($op = "list", $delta = 0) { if ($op == "list") { - $blocks[0]["info"] = t("Top nodes"); - $blocks[1]["info"] = t("Who's online"); + if (variable_get("statistics_enable_node_counter", 0)) { + $blocks[0]["info"] = t("Top nodes"); + } + if (variable_get("statistics_enable_access_log", 0)) { + $blocks[1]["info"] = t("Who's online"); + } return $blocks; } else { diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index f227baabf..b5ca7a9a5 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -812,8 +812,12 @@ function statistics_get($nid) { /* Block hook */ function statistics_block($op = "list", $delta = 0) { if ($op == "list") { - $blocks[0]["info"] = t("Top nodes"); - $blocks[1]["info"] = t("Who's online"); + if (variable_get("statistics_enable_node_counter", 0)) { + $blocks[0]["info"] = t("Top nodes"); + } + if (variable_get("statistics_enable_access_log", 0)) { + $blocks[1]["info"] = t("Who's online"); + } return $blocks; } else { -- cgit v1.2.3