diff options
author | friendica <info@friendica.com> | 2012-11-29 20:46:45 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-11-29 20:46:45 -0800 |
commit | 59ea85631199c126bc74af591f63ddf6dc1b36b8 (patch) | |
tree | 21e547639a5bcc186a9104ccd6de9bfe97f8014d /mod/ping.php | |
parent | dd428cf4fc1ec043eea99e8d909cc21c5e214d26 (diff) | |
download | volse-hubzilla-59ea85631199c126bc74af591f63ddf6dc1b36b8.tar.gz volse-hubzilla-59ea85631199c126bc74af591f63ddf6dc1b36b8.tar.bz2 volse-hubzilla-59ea85631199c126bc74af591f63ddf6dc1b36b8.zip |
further progress on new network/home notifications
Diffstat (limited to 'mod/ping.php')
-rw-r--r-- | mod/ping.php | 12 |
1 files changed, 6 insertions, 6 deletions
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(); |