aboutsummaryrefslogtreecommitdiffstats
path: root/include/taxonomy.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-17 18:13:20 -0800
committerfriendica <info@friendica.com>2015-02-17 18:13:20 -0800
commit33e406d7fc74c1701ed4bb1d2a2b2a1bb330683f (patch)
tree1edbf740ba788927b72f16c27fd3b785e8265070 /include/taxonomy.php
parent3d9273afad8645e2c3a063e797c0ac58c2cba2eb (diff)
downloadvolse-hubzilla-33e406d7fc74c1701ed4bb1d2a2b2a1bb330683f.tar.gz
volse-hubzilla-33e406d7fc74c1701ed4bb1d2a2b2a1bb330683f.tar.bz2
volse-hubzilla-33e406d7fc74c1701ed4bb1d2a2b2a1bb330683f.zip
make tag clouds honour the full permissions repertoire, not just yes/no public/private, but who are you and what tags can you see
Diffstat (limited to 'include/taxonomy.php')
-rw-r--r--include/taxonomy.php9
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),