From a1ef8f669d41908e5d457ffe2ab2ac0455fec037 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 20 Apr 2011 15:27:10 -0700 Subject: don't show connect link to authenticated visitors --- boot.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 060a9e7cd..2713f3dce 100644 --- a/boot.php +++ b/boot.php @@ -2,7 +2,7 @@ set_time_limit(0); -define ( 'FRIENDIKA_VERSION', '2.1.954' ); +define ( 'FRIENDIKA_VERSION', '2.1.955' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1053 ); @@ -2252,8 +2252,15 @@ function profile_sidebar($profile) { $photo = '
' . $profile['name'] . '
'; + // don't show connect link to yourself + $connect = (($profile['uid'] != local_user()) ? '
  • ' . t('Connect') . '
  • ' : ''); - + + // don't show connect link to authenticated visitors either + + if((remote_user()) && ($_SESSION['visitor_visiting'] == $profile['uid'])) + $connect = ''; + if((x($profile,'address') == 1) || (x($profile,'locality') == 1) || (x($profile,'region') == 1) -- cgit v1.2.3