aboutsummaryrefslogtreecommitdiffstats
path: root/include/contact_widgets.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-08 16:37:02 -0700
committerfriendica <info@friendica.com>2013-09-08 16:37:02 -0700
commitead50382c010769171e148b9458530f9f318ba84 (patch)
tree9c9f2c8bf43156f0fe518ddd3cb0da8ee2f21a34 /include/contact_widgets.php
parentf8afdb3cba25dc7dc70ac3d7c6e48e6595bd97d5 (diff)
parenta36abb764d04a92d97507b368b1b622a9483348a (diff)
downloadvolse-hubzilla-ead50382c010769171e148b9458530f9f318ba84.tar.gz
volse-hubzilla-ead50382c010769171e148b9458530f9f318ba84.tar.bz2
volse-hubzilla-ead50382c010769171e148b9458530f9f318ba84.zip
Merge pull request #119 from unary/categorywidget
only show categories this channel has used
Diffstat (limited to 'include/contact_widgets.php')
-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 cc7d92508..bc7faebc3 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -91,9 +91,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),
+ dbesc($a->profile['channel_hash'])
);
if($r && count($r)) {
foreach($r as $rr)