X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcommon.php;h=9781d1607c4f38011ff0e0e081912e63ca51406b;hb=de689583e2741a2caee0e266a19a07d1ad4ed043;hp=62a5185fed84c4a00256bab9447fc56c64b530b2;hpb=507f8ab4dfb1a31c97160f6f4ed1315f548d2642;p=friendica.git diff --git a/mod/common.php b/mod/common.php index 62a5185fed..9781d1607c 100644 --- a/mod/common.php +++ b/mod/common.php @@ -57,13 +57,13 @@ function common_content(&$a) { dbesc(normalise_link(get_my_url())), intval($profile_uid) ); - if(count($r)) + if (dbm::is_result($r)) $cid = $r[0]['id']; else { $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1", dbesc(normalise_link(get_my_url())) ); - if(count($r)) + if (dbm::is_result($r)) $zcid = $r[0]['id']; } } @@ -94,7 +94,7 @@ function common_content(&$a) { $r = common_friends_zcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']); - if(! count($r)) { + if (! dbm::is_result($r)) { return $o; } @@ -109,18 +109,18 @@ function common_content(&$a) { $rr[id] = $rr[cid]; $photo_menu = ''; - $photo_menu = contact_photo_menu ($rr); + $photo_menu = contact_photo_menu($rr); $entry = array( 'url' => $rr['url'], 'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']), - 'name' => $rr['name'], - 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB), - 'img_hover' => htmlentities($rr['name']), + 'name' => $contact_details['name'], + 'thumb' => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB), + 'img_hover' => htmlentities($contact_details['name']), 'details' => $contact_details['location'], 'tags' => $contact_details['keywords'], 'about' => $contact_details['about'], - 'account_type' => (($contact_details['community']) ? t('Forum') : ''), + 'account_type' => account_type($contact_details), 'network' => network_to_name($contact_details['network'], $contact_details['url']), 'photo_menu' => $photo_menu, 'id' => ++$id,