X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fviewcontacts.php;h=f7bf912fdffea333da38b0ed67236dc98b74962a;hb=5d7e1e1a1544421c594e13efb9c1ebece241e94f;hp=c9f465676cfe6da34991f3290cae8a998b0a10be;hpb=52f12ee28db97b29ce0f10c8ecf76144b80d4216;p=friendica.git diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index c9f465676c..f7bf912fdf 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -1,8 +1,11 @@ data['user'] = $r[0]; $a->profile_uid = $r[0]['uid']; @@ -28,7 +32,7 @@ function viewcontacts_init(&$a) { } -function viewcontacts_content(&$a) { +function viewcontacts_content(App $a) { require_once("mod/proxy.php"); if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { @@ -47,7 +51,8 @@ function viewcontacts_content(&$a) { } $r = q("SELECT COUNT(*) AS `total` FROM `contact` - WHERE `uid` = %d AND (NOT `blocked` OR `pending`) AND NOT `hidden` AND NOT `archive` + WHERE `uid` = %d AND NOT `blocked` AND NOT `pending` + AND NOT `hidden` AND NOT `archive` AND `network` IN ('%s', '%s', '%s')", intval($a->profile['uid']), dbesc(NETWORK_DFRN), @@ -58,7 +63,8 @@ function viewcontacts_content(&$a) { $a->set_pager_total($r[0]['total']); $r = q("SELECT * FROM `contact` - WHERE `uid` = %d AND (NOT `blocked` OR `pending`) AND NOT `hidden` AND NOT `archive` + WHERE `uid` = %d AND NOT `blocked` AND NOT `pending` + AND NOT `hidden` AND NOT `archive` AND `network` IN ('%s', '%s', '%s') ORDER BY `name` ASC LIMIT %d, %d", intval($a->profile['uid']), @@ -75,9 +81,11 @@ function viewcontacts_content(&$a) { $contacts = array(); - foreach($r as $rr) { - if($rr['self']) + foreach ($r as $rr) { + /// @TODO This triggers an E_NOTICE if 'self' is not there + if ($rr['self']) { continue; + } $url = $rr['url'];