From: paca70 Date: Sun, 7 Nov 2004 09:12:45 +0000 (+0000) Subject: If selected news count is zero, dont print forum headers. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=63fa3f8014d834a59dd1a1a98223ac9e734b6d58;p=moodle.git If selected news count is zero, dont print forum headers. --- diff --git a/index.php b/index.php index 18f1e89c24..d3bb6d1fec 100644 --- a/index.php +++ b/index.php @@ -170,9 +170,12 @@ } 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: