From 6cea04eb440c2bb08bcb81ae13749c08d09b755c Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Aug 2013 20:05:55 -0700 Subject: progress on generic sellpage - is not yet linked from existing connect buttons and editing has not been completed --- boot.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 0afc976ae..3327fdbb2 100755 --- a/boot.php +++ b/boot.php @@ -1572,11 +1572,11 @@ function profile_load(&$a, $nickname, $profile = '') { return; } -function profile_create_sidebar(&$a) { +function profile_create_sidebar(&$a,$connect = true) { $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); - $a->set_widget('profile',profile_sidebar($a->profile, $block)); + $a->set_widget('profile',profile_sidebar($a->profile, $block, $connect)); return; } @@ -1598,7 +1598,7 @@ function profile_create_sidebar(&$a) { -function profile_sidebar($profile, $block = 0) { +function profile_sidebar($profile, $block = 0, $show_connect = true) { $a = get_app(); @@ -1623,11 +1623,13 @@ function profile_sidebar($profile, $block = 0) { require_once('include/Contact.php'); - $connect_url = rconnect_url($profile['uid'],get_observer_hash()); + + $connect_url = (($show_connect) ? rconnect_url($profile['uid'],get_observer_hash()) : ''); + $connect = (($connect_url) ? t('Connect') : ''); if($connect_url) - $connect_url = $connect_url . '/follow?f=1&url=' . $profile['channel_address'] . '@' . $a->get_hostname(); + $connect_url = $connect_url . '/follow?f=1&url=' . urlencode($profile['channel_address'] . '@' . $a->get_hostname()); // show edit profile to yourself if($is_owner) { -- cgit v1.2.3