From e331f9490244726744530fccb0fa22c66837d19a Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 29 Feb 2008 06:51:02 +0000 Subject: [PATCH] MDL-13727 Added a cpability check when showing blog entries --- tag/index.php | 51 +++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/tag/index.php b/tag/index.php index 7cd4f81ca67..dfdeb6022f2 100644 --- a/tag/index.php +++ b/tag/index.php @@ -99,35 +99,38 @@ if ($usercount > 0) { // 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. - Yu 29/8/07 -if ($blogs = blog_fetch_entries('', 10, 0, 'site', '', $tag->id)) { +if (has_capability('moodle/blog:view', $systemcontext)) { // You have to see blogs obviously - print_box_start('generalbox', 'tag-blogs'); + if ($blogs = blog_fetch_entries('', 10, 0, 'site', '', $tag->id)) { - print_heading(get_string('relatedblogs', 'tag'), '', 3); + print_box_start('generalbox', 'tag-blogs'); - echo ''; - - echo '

'.get_string('seeallblogs', 'tag').'...

'; - - print_box_end(); }