aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 3327fdbb2..c8a8fbc7e 100755
--- a/boot.php
+++ b/boot.php
@@ -1623,13 +1623,20 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
require_once('include/Contact.php');
+ if($show_connect) {
- $connect_url = (($show_connect) ? rconnect_url($profile['uid'],get_observer_hash()) : '');
-
- $connect = (($connect_url) ? t('Connect') : '');
+ // This will return an empty string if we're already connected.
+
+ $connect_url = rconnect_url($profile['uid'],get_observer_hash());
+ $connect = (($connect_url) ? t('Connect') : '');
+ if($connect_url)
+ $connect_url = sprintf($connect_url,urlencode($profile['channel_address'] . '@' . $a->get_hostname()));
- if($connect_url)
- $connect_url = $connect_url . '/follow?f=1&url=' . urlencode($profile['channel_address'] . '@' . $a->get_hostname());
+ // premium channel - over-ride
+
+ if($profile['channel_pageflags'] & PAGE_PREMIUM)
+ $connect_url = z_root() . '/connect/' . $profile['channel_address'];
+ }
// show edit profile to yourself
if($is_owner) {