summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-05-17 19:57:52 +0000
committerDries Buytaert <dries@buytaert.net>2003-05-17 19:57:52 +0000
commit07ab3915c46f06f948c929d3871ac4a10c3163f3 (patch)
tree8618532c1942180b77b673e99251244591051126 /modules
parentbadf1ca458f7a7a12ff8fe0af6701ff8f8e94fd9 (diff)
downloadbrdo-07ab3915c46f06f948c929d3871ac4a10c3163f3.tar.gz
brdo-07ab3915c46f06f948c929d3871ac4a10c3163f3.tar.bz2
- 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.
Diffstat (limited to 'modules')
-rw-r--r--modules/statistics.module8
-rw-r--r--modules/statistics/statistics.module8
2 files changed, 12 insertions, 4 deletions
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 {