]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
added more curly braces + space between "if" and brace
[friendica.git] / mod / common.php
index bc6533624993af0e08d88818c04d2a9d6e93330e..9781d1607c4f38011ff0e0e081912e63ca51406b 100644 (file)
@@ -57,13 +57,13 @@ function common_content(&$a) {
                                dbesc(normalise_link(get_my_url())),
                                intval($profile_uid)
                        );
-                       if(dba::is_result($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(dba::is_result($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,