aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ping.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-07 18:44:06 -0700
committerfriendica <info@friendica.com>2012-10-07 18:44:06 -0700
commita56c0425e6f80e77a1e52b13cd5a14cb6e838b9a (patch)
tree181d3e58294b5bd9c62307bd0a5b2447b3f3c625 /mod/ping.php
parentc612253627019c146b8a49d6f927b475cac8be2f (diff)
downloadvolse-hubzilla-a56c0425e6f80e77a1e52b13cd5a14cb6e838b9a.tar.gz
volse-hubzilla-a56c0425e6f80e77a1e52b13cd5a14cb6e838b9a.tar.bz2
volse-hubzilla-a56c0425e6f80e77a1e52b13cd5a14cb6e838b9a.zip
start fixing all the item queries
Diffstat (limited to 'mod/ping.php')
-rw-r--r--mod/ping.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/mod/ping.php b/mod/ping.php
index c9c9b5ecf..ff8d977dc 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -99,13 +99,10 @@ function ping_init(&$a) {
$t1 = dba_timer();
- $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`wall`, `item`.`author-name`,
- `item`.`contact-id`, `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`,
- `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink`
- FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent`
- WHERE `item`.`unseen` = 1 AND `item`.`visible` = 1 AND
- `item`.`deleted` = 0 AND `item`.`uid` = %d
- ORDER BY `item`.`created` DESC",
+ $r = q("SELECT id, item_restrict, item_flags FROM item
+ WHERE item_restrict = %d and item_flags & %d and `item`.`uid` = %d",
+ intval(ITEM_VISIBLE),
+ intval(ITEM_UNSEEN),
intval(local_user())
);
@@ -115,7 +112,7 @@ function ping_init(&$a) {
call_hooks('network_ping', $arr);
foreach ($r as $it) {
- if($it['wall'])
+ if($it['item_flags'] & ITEM_WALL)
$result['home'] ++;
else
$result['network'] ++;