From 1390f203a7f07e82347896ec6b65e0ed999f5637 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 29 Jan 2004 05:59:26 +0000 Subject: [PATCH] Dont print learning forums table if there aren't any --- mod/forum/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/forum/index.php b/mod/forum/index.php index 510299a4bff..4d0b844e4ad 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -85,7 +85,7 @@ if ($learningforums) { $currentsection = ""; - foreach ($learningforums as $forum) { + foreach ($learningforums as $key => $forum) { $count = count_records("forum_discussions", "forum", "$forum->id"); $forum->intro = forum_shorten_post($forum->intro); @@ -94,6 +94,7 @@ if (!$forum->section) { // forums in the "0" section => generaltable $generalforums[] = $forum; + unset($learningforums[$key]); continue; }