From be0459a98b9c047e4cf89b835fd35a32da51ca31 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 14 Jun 2015 21:08:00 -0700 Subject: convert the abook fields --- mod/ping.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'mod/ping.php') diff --git a/mod/ping.php b/mod/ping.php index f2ec93f32..9af234514 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -296,10 +296,8 @@ function ping_init(&$a) { if(argc() > 1 && (argv(1) === 'intros')) { $result = array(); - $r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or xchan_deleted = 1 or xchan_orphan = 1) ORDER BY abook_created DESC LIMIT 50", - intval(local_channel()), - intval(ABOOK_FLAG_PENDING), - intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED) + $r = q("SELECT * FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and abook_pending = 1 and abook_self = 0 and abook_ignored = 0 and xchan_deleted = 0 and xchan_orphan = 0 ORDER BY abook_created DESC LIMIT 50", + intval(local_channel()) ); if($r) { @@ -407,10 +405,8 @@ function ping_init(&$a) { $t2 = dba_timer(); if($vnotify & VNOTIFY_INTRO) { - $intr = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and (abook_flags & %d) > 0 and not ((abook_flags & %d) > 0 or xchan_deleted = 1 or xchan_orphan = 1)", - intval(local_channel()), - intval(ABOOK_FLAG_PENDING), - intval(ABOOK_FLAG_SELF|ABOOK_FLAG_IGNORED) + $intr = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and abook_pending = 1 and abook_self = 0 and abook_ignored = 0 and xchan_deleted = 0 and xchan_orphan = 0)", + intval(local_channel()) ); $t3 = dba_timer(); -- cgit v1.2.3