From: Michael Vogel Date: Sun, 29 Nov 2015 08:56:34 +0000 (+0100) Subject: Viewcontacts now only shows native contacts (no more connector contacts) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c77ef0c4938144e5d7764664e6029c1f0ec49d67;p=friendica.git Viewcontacts now only shows native contacts (no more connector contacts) --- diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index c3bf3964f7..d16a48e349 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -26,19 +26,30 @@ function viewcontacts_content(&$a) { } - $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ", - intval($a->profile['uid']) + $r = q("SELECT COUNT(*) AS `total` FROM `contact` + WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 + AND `network` IN ('%s', '%s', '%s')", + intval($a->profile['uid']), + dbesc(NETWORK_DFRN), + dbesc(NETWORK_DIASPORA), + dbesc(NETWORK_OSTATUS) ); if(count($r)) $a->set_pager_total($r[0]['total']); - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ORDER BY `name` ASC LIMIT %d , %d ", + $r = q("SELECT * FROM `contact` + WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 + AND `network` IN ('%s', '%s', '%s') + ORDER BY `name` ASC LIMIT %d, %d", intval($a->profile['uid']), + dbesc(NETWORK_DFRN), + dbesc(NETWORK_DIASPORA), + dbesc(NETWORK_OSTATUS), intval($a->pager['start']), intval($a->pager['itemspage']) ); - if(! count($r)) { - info( t('No contacts.') . EOL ); + if(!count($r)) { + info(t('No contacts.').EOL); return $o; }