Merge pull request #3983 from annando/nogroup

Small fixes to "nogroup"
This commit is contained in:
Hypolite Petovan 2017-11-29 16:07:27 -05:00 committed by GitHub
commit d42fe4bf5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -55,7 +55,7 @@ function nogroup_content(App $a)
'about' => $contact_details['about'],
'sparkle' => $sparkle,
'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
'url' => $url,
'url' => $rr['url'],
'network' => network_to_name($rr['network'], $url),
);
}

View file

@ -477,12 +477,14 @@ class Contact extends BaseObject
"SELECT COUNT(*) AS `total`
FROM `contact`
WHERE `uid` = %d
AND `self` = 0
AND NOT `self`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`
WHERE `uid` = %d
) ", intval($uid), intval($uid)
)", intval($uid), intval($uid)
);
return $r;
@ -492,13 +494,13 @@ class Contact extends BaseObject
"SELECT *
FROM `contact`
WHERE `uid` = %d
AND `self` = 0
AND NOT `self`
AND NOT `blocked`
AND NOT `pending`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member` WHERE `uid` = %d
)
AND `blocked` = 0
AND `pending` = 0
LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count)
);
return $r;