aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php12
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();