]> git.mjollnir.org Git - moodle.git/commitdiff
If selected news count is zero, dont print forum headers.
authorpaca70 <paca70>
Sun, 7 Nov 2004 09:12:45 +0000 (09:12 +0000)
committerpaca70 <paca70>
Sun, 7 Nov 2004 09:12:45 +0000 (09:12 +0000)
index.php

index 18f1e89c24143d37cdbd226ba614b7e406b7525c..d3bb6d1feccfb321142e31599175f621649960e8 100644 (file)
--- a/index.php
+++ b/index.php
             } else {
                 $headertext = $newsforum->name;
             }
-            print_heading_block($headertext);
-            print_spacer(8,1);
-            forum_print_latest_discussions($newsforum->id, $site->newsitems);
+            
+            if ($site->newsitems) { //print forums only when needed
+                print_heading_block($headertext);
+                print_spacer(8,1);
+                forum_print_latest_discussions($newsforum->id, $site->newsitems);
+            }    
         break;
 
         case FRONTPAGECOURSELIST: