From 95d7514633e806984c1589e2ac4165c9dc5e5435 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 20 Jun 2013 15:55:20 -0700 Subject: undefined activity_compare which broke notifications (should be activity_match) and revamp xchan_query as abook is optional and need not be present - if it isn't there we still need the xchan, but if it is there we need to make sure that it belongs to whichever channel owns the post --- include/text.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index d36475484..afe2490e7 100755 --- a/include/text.php +++ b/include/text.php @@ -1440,7 +1440,7 @@ function item_post_type($item) { break; } - if(strlen($item['verb']) && (! activity_compare($item['verb'],ACTIVITY_POST))) + if(strlen($item['verb']) && (! activity_match($item['verb'],ACTIVITY_POST))) $post_type = t('activity'); return $post_type; @@ -1556,8 +1556,8 @@ function xchan_query(&$items,$abook = true) { } if(count($arr)) { if($abook) { - $chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash - where abook_channel = %d and xchan_hash in (" . implode(',', $arr) . ") and ( hubloc_flags & " . intval(HUBLOC_FLAGS_PRIMARY) . " )", + $chans = q("select * from xchan left join hubloc on hubloc_hash = xchan_hash left join abook on abook_xchan = xchan_hash and abook_channel = %d + where xchan_hash in (" . implode(',', $arr) . ") and ( hubloc_flags & " . intval(HUBLOC_FLAGS_PRIMARY) . " )", intval($item['uid']) ); } -- cgit v1.2.3