From 01d0a9712873f9817af89e9b89f3e0f6c3a2fd13 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 30 Aug 2007 09:54:12 +0000 Subject: [PATCH] Clean up code a bit and don't show entries when there are none --- tag/index.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tag/index.php b/tag/index.php index 4d1501bb89..144d8c97b0 100644 --- a/tag/index.php +++ b/tag/index.php @@ -83,17 +83,20 @@ if ($usercount > 0) { } -// print last 10 blogs -print_box_start('generalbox', 'tag-blogs'); -print_heading(get_string('lasttenblogs', 'tag'), '', 3); + +// Print last 10 blogs // I was not able to use get_items_tagged_with() because it automatically // tries to join on 'blog' table, since the itemtype is 'blog'. However blogs -// uses the post table so this would not really work. +// uses the post table so this would not really work. - Yu 29/8/07 if ($blogs = fetch_entries('', 10, 0, 'site', '', $tag->id)) { + print_box_start('generalbox', 'tag-blogs'); + + print_heading(get_string('lasttenblogs', 'tag'), '', 3); + echo ''; + print_box_end(); } -print_box_end(); + echo ''; -- 2.39.5