From 59ea85631199c126bc74af591f63ddf6dc1b36b8 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 29 Nov 2012 20:46:45 -0800 Subject: further progress on new network/home notifications --- mod/ping.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mod/ping.php') diff --git a/mod/ping.php b/mod/ping.php index b1bb569f2..cdc18a303 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -93,23 +93,23 @@ function ping_init(&$a) { if(argc() > 1 && (argv(1) === 'network' || argv(1) === 'home')) { $result = array(); - - $r = q("SELECT id, item_restrict, item_flags FROM item - WHERE item_restrict = %d and item_flags & %d and `item`.`uid` = %d", +dbg(1); + $r = q("SELECT * FROM item + WHERE item_restrict = %d and ( item_flags & %d ) and uid = %d", intval(ITEM_VISIBLE), intval(ITEM_UNSEEN), intval(local_user()) ); - +dbg(0); if($r) { xchan_query($r); foreach($r as $item) { - if((argv(1) === 'home') && (! ($item['item_flags'] & ITEM_HOME))) + if((argv(1) === 'home') && (! ($item['item_flags'] & ITEM_WALL))) continue; $result[] = format_notification($item); } } - + logger('ping: ' . print_r($result,true)); echo json_encode(array( argv(1) => $result)); killme(); -- cgit v1.2.3