aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-13 02:06:05 -0700
committerfriendica <info@friendica.com>2013-08-13 02:06:05 -0700
commitb9a8b73392afc6e460073ac6305da24623de5b49 (patch)
tree425cd32b3b604c9a641030c205244bdacddf2731 /boot.php
parent55cb32248953c6e63a2da478f0eb3895875f93d8 (diff)
downloadvolse-hubzilla-b9a8b73392afc6e460073ac6305da24623de5b49.tar.gz
volse-hubzilla-b9a8b73392afc6e460073ac6305da24623de5b49.tar.bz2
volse-hubzilla-b9a8b73392afc6e460073ac6305da24623de5b49.zip
untested patch for issue #58 - will require theming if it works
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/boot.php b/boot.php
index 6d5ca337b..b59b7024c 100755
--- a/boot.php
+++ b/boot.php
@@ -1623,20 +1623,13 @@ function profile_sidebar($profile, $block = 0) {
call_hooks('profile_sidebar_enter', $profile);
- // don't show connect link to yourself
- $connect = (($profile['uid'] != local_user()) ? t('Connect') : False);
+ require_once('include/Contact.php');
- // don't show connect link to authenticated visitors either
-
- if(remote_user() && count($_SESSION['remote'])) {
- foreach($_SESSION['remote'] as $visitor) {
- if($visitor['uid'] == $profile['uid']) {
- $connect = false;
- break;
- }
- }
- }
+ $connect_url = rconnect_url($profile['uid'],get_observer_xchan());
+ $connect = (($connect_url) ? t('Connect') : '');
+ if($connect_url)
+ $connect_url = $connect_url . '/follow?f=1&url=' . $profile['channel_address'] . '@' . $a->get_hostname();
// show edit profile to yourself
if($is_owner) {
@@ -1702,6 +1695,7 @@ function profile_sidebar($profile, $block = 0) {
$o .= replace_macros($tpl, array(
'$profile' => $profile,
'$connect' => $connect,
+ '$connect_url' => $connect_url,
'$location' => $location,
'$gender' => $gender,
'$pdesc' => $pdesc,