Remove vcard Edit link pointing to profiles for contacts
This commit is contained in:
parent
0811f9257e
commit
8680068037
1 changed files with 7 additions and 2 deletions
|
@ -202,6 +202,9 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
$address = false;
|
$address = false;
|
||||||
// $pdesc = true;
|
// $pdesc = true;
|
||||||
|
|
||||||
|
// This function can also use contact information in $profile
|
||||||
|
$is_contact = x($profile, 'cid');
|
||||||
|
|
||||||
if((! is_array($profile)) && (! count($profile)))
|
if((! is_array($profile)) && (! count($profile)))
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
|
@ -280,8 +283,10 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
$wallmessage_link = false;
|
$wallmessage_link = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var_dump($profile);
|
||||||
|
|
||||||
// show edit profile to yourself
|
// show edit profile to yourself
|
||||||
if ($profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
|
if (!$is_contact && $profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
|
||||||
$profile['edit'] = array(App::get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
|
$profile['edit'] = array(App::get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
|
||||||
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
||||||
local_user());
|
local_user());
|
||||||
|
@ -310,7 +315,7 @@ function profile_sidebar($profile, $block = 0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
|
if (!$is_contact && $profile['uid'] == local_user() && !feature_enabled(local_user(),'multi_profiles')) {
|
||||||
$profile['edit'] = array(App::get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
|
$profile['edit'] = array(App::get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
|
||||||
$profile['menu'] = array(
|
$profile['menu'] = array(
|
||||||
'chg_photo' => t('Change profile photo'),
|
'chg_photo' => t('Change profile photo'),
|
||||||
|
|
Loading…
Reference in a new issue