convert the abook fields
This commit is contained in:
12
mod/ping.php
12
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();
|
||||
|
||||
Reference in New Issue
Block a user