don't include invisible "update activities" in category widget
This commit is contained in:
parent
fda5231a71
commit
9dd545f420
@ -72,21 +72,22 @@ function categories_widget($baseurl,$selected = '') {
|
|||||||
$item_normal = item_normal();
|
$item_normal = item_normal();
|
||||||
|
|
||||||
$terms = array();
|
$terms = array();
|
||||||
$r = q("select distinct(term.term)
|
$r = q("select distinct(term.term) from term join item on term.oid = item.id
|
||||||
from term join item on term.oid = item.id
|
|
||||||
where item.uid = %d
|
where item.uid = %d
|
||||||
and term.uid = item.uid
|
and term.uid = item.uid
|
||||||
and term.ttype = %d
|
and term.ttype = %d
|
||||||
and term.otype = %d
|
and term.otype = %d
|
||||||
and item.owner_xchan = '%s'
|
and item.owner_xchan = '%s'
|
||||||
and item.item_wall = 1
|
and item.item_wall = 1
|
||||||
|
and item.verb != '%s'
|
||||||
$item_normal
|
$item_normal
|
||||||
$sql_extra
|
$sql_extra
|
||||||
order by term.term asc",
|
order by term.term asc",
|
||||||
intval(App::$profile['profile_uid']),
|
intval(App::$profile['profile_uid']),
|
||||||
intval(TERM_CATEGORY),
|
intval(TERM_CATEGORY),
|
||||||
intval(TERM_OBJ_POST),
|
intval(TERM_OBJ_POST),
|
||||||
dbesc(App::$profile['channel_hash'])
|
dbesc(App::$profile['channel_hash']),
|
||||||
|
dbesc(ACTIVITY_UPDATE)
|
||||||
);
|
);
|
||||||
if($r && count($r)) {
|
if($r && count($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
|
@ -55,18 +55,20 @@ function term_item_parent_query($uid,$table,$s,$type = TERM_UNKNOWN, $type2 = ''
|
|||||||
$s = str_replace('*','%',$s);
|
$s = str_replace('*','%',$s);
|
||||||
|
|
||||||
if($type2) {
|
if($type2) {
|
||||||
$r = q("select parent from item left join term on term.oid = item.id where term.ttype in (%d, %d) and term.term like '%s' and term.uid = %d and term.otype = 1",
|
$r = q("select parent from item left join term on term.oid = item.id where term.ttype in (%d, %d) and term.term like '%s' and term.uid = %d and term.otype = 1 and item.verb != '%s'",
|
||||||
intval($type),
|
intval($type),
|
||||||
intval($type2),
|
intval($type2),
|
||||||
dbesc($s),
|
dbesc($s),
|
||||||
intval($uid)
|
intval($uid),
|
||||||
|
dbesc(ACTIVITY_UPDATE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$r = q("select parent from item left join term on term.oid = item.id where term.ttype = %d and term.term like '%s' and term.uid = %d and term.otype = 1",
|
$r = q("select parent from item left join term on term.oid = item.id where term.ttype = %d and term.term like '%s' and term.uid = %d and term.otype = 1 and item.verb != '%s'",
|
||||||
intval($type),
|
intval($type),
|
||||||
dbesc($s),
|
dbesc($s),
|
||||||
intval($uid)
|
intval($uid),
|
||||||
|
dbesc(ACTIVITY_UPDATE)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user