]> git.mxchange.org Git - friendica.git/blobdiff - mod/allfriends.php
added spaces + curly braces
[friendica.git] / mod / allfriends.php
index 360b222b50dd647ad56d0febaff70c75129bffda..e4f067eaf7d4cd1b0aef62fcf800895eee17c41d 100644 (file)
@@ -39,7 +39,7 @@ function allfriends_content(&$a) {
 
        $r = all_friends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
 
-       if(! count($r)) {
+       if (! dbm::is_result($r)) {
                $o .= t('No friends to display.');
                return $o;
        }
@@ -60,9 +60,11 @@ function allfriends_content(&$a) {
                        $photo_menu = contact_photo_menu ($rr);
                }
                else {
-                       $connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url'];
-                       $photo_menu = array(array(t("View Profile"), zrl($rr['url'])));
-                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+                       $connlnk = App::get_baseurl() . '/follow/?url=' . $rr['url'];
+                       $photo_menu = array(
+                               'profile' => array(t("View Profile"), zrl($rr['url'])),
+                               'follow' => array(t("Connect/Follow"), $connlnk)
+                       );
                }
 
                $entry = array(
@@ -74,7 +76,7 @@ function allfriends_content(&$a) {
                        '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,
                        'conntxt'       => t('Connect'),