aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Johnston <michaelgeorgejohnston@gmail.com>2013-09-08 13:55:37 -0400
committerMichael Johnston <michaelgeorgejohnston@gmail.com>2013-09-08 13:55:37 -0400
commita1b3a72f9ee893f648daffa818fc61706da0842f (patch)
tree59244167cc0b36a10c337b79a946a19ec1b7413d /include
parentfe5f470c62a45191ed261808aa41400234dd306d (diff)
downloadvolse-hubzilla-a1b3a72f9ee893f648daffa818fc61706da0842f.tar.gz
volse-hubzilla-a1b3a72f9ee893f648daffa818fc61706da0842f.tar.bz2
volse-hubzilla-a1b3a72f9ee893f648daffa818fc61706da0842f.zip
only show categories this channel has used
Diffstat (limited to 'include')
-rw-r--r--include/contact_widgets.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index e5f778e49..6bebf96e3 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -76,9 +76,16 @@ function categories_widget($baseurl,$selected = '') {
return '';
$terms = array();
- $r = q("select distinct(term) from term where uid = %d and type = %d order by term asc",
+ $r = q("select distinct(term.term)
+ from term join item on term.oid = item.id
+ where item.uid = %d
+ and term.uid = item.uid
+ and term.type = %d
+ and item.author_xchan = '%s'
+ order by term.term asc",
intval($a->profile['profile_uid']),
- intval(TERM_CATEGORY)
+ intval(TERM_CATEGORY),
+ $a->profile['channel_hash']
);
if($r && count($r)) {
foreach($r as $rr)