diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/taxonomy.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/taxonomy.php b/include/taxonomy.php index be80008df..d36c05db2 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -98,7 +98,12 @@ function format_term_for_display($term) { function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $type = TERM_HASHTAG) { - $sql_options = ''; + require_once('include/security.php'); + + if(! perm_is_allowed($uid,get_observer_hash(),'view_stream')) + return array(); + + $sql_options = item_permissions_sql($uid); $count = intval($count); if($flags) @@ -114,7 +119,7 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $ // Fetch tags $r = q("select term, count(term) as total from term left join item on term.oid = item.id where term.uid = %d and term.type = %d - and otype = %d and item_restrict = %d and item_private = 0 + and otype = %d and item_restrict = %d $sql_options group by term order by total desc %s", intval($uid), |