mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 09:15:19 +00:00
Merge pull request #119 from unary/categorywidget
only show categories this channel has used
This commit is contained in:
commit
ead50382c0
1 changed files with 9 additions and 2 deletions
|
@ -91,9 +91,16 @@ function categories_widget($baseurl,$selected = '') {
|
||||||
return '';
|
return '';
|
||||||
|
|
||||||
$terms = array();
|
$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($a->profile['profile_uid']),
|
||||||
intval(TERM_CATEGORY)
|
intval(TERM_CATEGORY),
|
||||||
|
dbesc($a->profile['channel_hash'])
|
||||||
);
|
);
|
||||||
if($r && count($r)) {
|
if($r && count($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
|
|
Loading…
Reference in a new issue