make tag clouds honour the full permissions repertoire, not just yes/no public/private, but who are you and what tags can you see

This commit is contained in:
friendica 2015-02-17 18:13:20 -08:00
parent 3d9273afad
commit 33e406d7fc
2 changed files with 8 additions and 3 deletions

View File

@ -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),

View File

@ -1 +1 @@
2015-02-16.946
2015-02-17.947