MDL-15676: restrict block/blog_tags to showing blog tags.

This commit is contained in:
scyrma
2008-07-17 04:22:11 +00:00
parent c4c2438e8b
commit 7536d5b28c
+1
View File
@@ -78,6 +78,7 @@ class block_blog_tags extends block_base {
$sql .= "FROM {$CFG->prefix}tag t, {$CFG->prefix}tag_instance ti, {$CFG->prefix}post p ";
$sql .= 'WHERE t.id = ti.tagid ';
$sql .= 'AND p.id = ti.itemid ';
$sql .= 'AND ti.itemtype = \'post\' ';
// admins should be able to read all tags
if (!has_capability('moodle/user:readuserblogs', get_context_instance(CONTEXT_SYSTEM))) {