]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
Diaspora: Fix class name case + add self
[friendica.git] / mod / common.php
index 4cdbe9641b3c006fd0b3c39bfaa3ef798f917ae0..063eafe67b90d3a1925f6571abb7325e9351c8e8 100644 (file)
@@ -5,7 +5,6 @@ require_once('include/Contact.php');
 require_once('include/contact_selectors.php');
 require_once('mod/contacts.php');
 
-if(! function_exists('common_content')) {
 function common_content(&$a) {
 
        $o = '';
@@ -41,7 +40,7 @@ function common_content(&$a) {
                $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
                        '$name' => htmlentities($c[0]['name']),
                        '$photo' => $c[0]['photo'],
-                       'url' => z_root() . '/contacts/' . $cid
+                       'url' => 'contacts/' . $cid
                ));
 
                if(! x($a->page,'aside'))
@@ -110,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,
@@ -145,4 +144,3 @@ function common_content(&$a) {
 
        return $o;
 }
-}