From 8eed5abd866db72a45a5050d696a48bb7a8be2da Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Mon, 28 Oct 2002 19:36:37 +0000 Subject: - Fixing blocks for forum, queue and statistics. --- modules/statistics.module | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'modules/statistics.module') diff --git a/modules/statistics.module b/modules/statistics.module index f5b1bd569..d4a7137f4 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -839,17 +839,27 @@ function statistics_get($nid) { /* Block hook */ -function statistics_block() { - - $block[0]["subject"] = variable_get("statistics_block_top_title", "Popular content"); - $block[0]["content"] = statistics_display_topnodes_block(); - $block[0]["info"] = "Top nodes"; +function statistics_block($op = "list", $delta = 0) { + if ($op == "list") { + $blocks[0]["info"] = t("Top nodes"); + $blocks[1]["info"] = t("Who's online"); + return $blocks; + } + else { + switch($op) { + case 0: + $block["subject"] = variable_get("statistics_block_top_title", "Popular content"); + $block["content"] = statistics_display_topnodes_block(); + break; - $block[1]["subject"] = variable_get("statistics_block_online_title", "Who's online"); - $block[1]["content"] = statistics_display_online_block(); - $block[1]["info"] = "Who's online"; + case 1: + $block["subject"] = variable_get("statistics_block_online_title", "Who's online"); + $block["content"] = statistics_display_online_block(); + break; + } - return $block; + return $block; + } } -- cgit v1.2.3