]> git.mjollnir.org Git - moodle.git/commitdiff
Dont print learning forums table if there aren't any
authormoodler <moodler>
Thu, 29 Jan 2004 05:59:26 +0000 (05:59 +0000)
committermoodler <moodler>
Thu, 29 Jan 2004 05:59:26 +0000 (05:59 +0000)
mod/forum/index.php

index 510299a4bfff5c0fb92d0ef7597fc0a1d70495b4..4d0b844e4adbf11a2590b6ec8d91487da59c25ae 100644 (file)
@@ -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;
                 }