aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-24 15:39:00 -0800
committerzotlabs <mike@macgirvin.com>2017-11-24 15:39:00 -0800
commit9dd545f4205a0f543a883422135e560c4ec74ad1 (patch)
tree86fe0f4765c3f879cbe3bdf999d7cb93c90a884e /include
parentfda5231a719025c0e2d7cc3954ebbab5b0d53586 (diff)
downloadvolse-hubzilla-9dd545f4205a0f543a883422135e560c4ec74ad1.tar.gz
volse-hubzilla-9dd545f4205a0f543a883422135e560c4ec74ad1.tar.bz2
volse-hubzilla-9dd545f4205a0f543a883422135e560c4ec74ad1.zip
don't include invisible "update activities" in category widget
Diffstat (limited to 'include')
-rw-r--r--include/contact_widgets.php61
-rw-r--r--include/taxonomy.php10
2 files changed, 37 insertions, 34 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index b36471924..a105bca19 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -72,21 +72,22 @@ function categories_widget($baseurl,$selected = '') {
$item_normal = item_normal();
$terms = array();
- $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.ttype = %d
- and term.otype = %d
- and item.owner_xchan = '%s'
- and item.item_wall = 1
- $item_normal
- $sql_extra
- order by term.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.ttype = %d
+ and term.otype = %d
+ and item.owner_xchan = '%s'
+ and item.item_wall = 1
+ and item.verb != '%s'
+ $item_normal
+ $sql_extra
+ order by term.term asc",
intval(App::$profile['profile_uid']),
- intval(TERM_CATEGORY),
- intval(TERM_OBJ_POST),
- dbesc(App::$profile['channel_hash'])
+ intval(TERM_CATEGORY),
+ intval(TERM_OBJ_POST),
+ dbesc(App::$profile['channel_hash']),
+ dbesc(ACTIVITY_UPDATE)
);
if($r && count($r)) {
foreach($r as $rr)
@@ -118,19 +119,19 @@ function cardcategories_widget($baseurl,$selected = '') {
$terms = array();
$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.ttype = %d
+ from term join item on term.oid = item.id
+ where item.uid = %d
+ and term.uid = item.uid
+ and term.ttype = %d
and term.otype = %d
- and item.owner_xchan = '%s'
+ and item.owner_xchan = '%s'
$item_normal
$sql_extra
- order by term.term asc",
+ order by term.term asc",
intval(App::$profile['profile_uid']),
- intval(TERM_CATEGORY),
+ intval(TERM_CATEGORY),
intval(TERM_OBJ_POST),
- dbesc(App::$profile['channel_hash'])
+ dbesc(App::$profile['channel_hash'])
);
if($r && count($r)) {
foreach($r as $rr)
@@ -163,19 +164,19 @@ function articlecategories_widget($baseurl,$selected = '') {
$terms = array();
$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.ttype = %d
+ from term join item on term.oid = item.id
+ where item.uid = %d
+ and term.uid = item.uid
+ and term.ttype = %d
and term.otype = %d
- and item.owner_xchan = '%s'
+ and item.owner_xchan = '%s'
$item_normal
$sql_extra
- order by term.term asc",
+ order by term.term asc",
intval(App::$profile['profile_uid']),
- intval(TERM_CATEGORY),
+ intval(TERM_CATEGORY),
intval(TERM_OBJ_POST),
- dbesc(App::$profile['channel_hash'])
+ dbesc(App::$profile['channel_hash'])
);
if($r && count($r)) {
foreach($r as $rr)
diff --git a/include/taxonomy.php b/include/taxonomy.php
index fbd2a18db..a13a9cf77 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -55,18 +55,20 @@ function term_item_parent_query($uid,$table,$s,$type = TERM_UNKNOWN, $type2 = ''
$s = str_replace('*','%',$s);
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($type2),
dbesc($s),
- intval($uid)
+ intval($uid),
+ dbesc(ACTIVITY_UPDATE)
);
}
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),
dbesc($s),
- intval($uid)
+ intval($uid),
+ dbesc(ACTIVITY_UPDATE)
);
}