From: moodler Date: Thu, 29 Jan 2004 05:59:26 +0000 (+0000) Subject: Dont print learning forums table if there aren't any X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=1390f203a7f07e82347896ec6b65e0ed999f5637;p=moodle.git Dont print learning forums table if there aren't any --- diff --git a/mod/forum/index.php b/mod/forum/index.php index 510299a4bf..4d0b844e4a 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; }