require_once('include/Contact.php');
require_once('include/contact_selectors.php');
-function viewcontacts_init(&$a) {
+function viewcontacts_init(App $a) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
dbesc($nick)
);
- if(! dbm::is_result($r))
+ if (! dbm::is_result($r)) {
return;
+ }
$a->data['user'] = $r[0];
$a->profile_uid = $r[0]['uid'];
}
-function viewcontacts_content(&$a) {
+function viewcontacts_content(App $a) {
require_once("mod/proxy.php");
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
$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'];