From 593d361d2e9dd177d4125a8751540f0afa4b2323 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 9 Nov 2012 00:02:46 -0800 Subject: profile/channel page view contacts --- boot.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 8e8b92593..707545155 100644 --- a/boot.php +++ b/boot.php @@ -1280,6 +1280,8 @@ if(! function_exists('profile_sidebar')) { $a = get_app(); + $observer = $a->get_observer(); + $o = ''; $location = false; $address = false; @@ -1315,7 +1317,7 @@ if(! function_exists('profile_sidebar')) { // show edit profile to yourself - if ($profile['uid'] == local_user()) { + if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) { $profile['edit'] = array($a->get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles')); $r = q("SELECT * FROM `profile` WHERE `uid` = %d", @@ -1373,23 +1375,16 @@ if(! function_exists('profile_sidebar')) { ? trim(substr($profile['name'],0,strpos($profile['name'],' '))) : $profile['name']); $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'],strlen($firstname)))); - $diaspora = array( - 'podloc' => $a->get_baseurl(), - 'searchable' => (($profile['publish']) ? 'true' : 'false' ), - 'nickname' => $profile['nickname'], - 'fullname' => $profile['name'], - 'firstname' => $firstname, - 'lastname' => $lastname, - 'photo300' => $a->get_cached_avatar_image($a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg'), - 'photo100' => $a->get_cached_avatar_image($a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg'), - 'photo50' => $a->get_cached_avatar_image($a->get_baseurl() . '/photo/custom/50/' . $profile['uid'] . '.jpg'), - ); +logger('observer' . print_r($observer,true)); +logger('uid' . $profile['uid']); - if (!$block){ + if(is_array($observer) + && perm_is_allowed($profile['uid'],$observer['xchan_hash'],'view_contacts')) { $contact_block = contact_block(); } + $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros($tpl, array( -- cgit v1.2.3