diff options
author | friendica <info@friendica.com> | 2013-12-11 14:54:36 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-11 14:54:36 -0800 |
commit | 40e2900326a25ba0e2feedb802d38b7052b194cc (patch) | |
tree | b2de897ab6f3c9803c890ca7f56a928d9153683e /include | |
parent | 652959678f47b84830123df4fac8add31657b4c9 (diff) | |
download | volse-hubzilla-40e2900326a25ba0e2feedb802d38b7052b194cc.tar.gz volse-hubzilla-40e2900326a25ba0e2feedb802d38b7052b194cc.tar.bz2 volse-hubzilla-40e2900326a25ba0e2feedb802d38b7052b194cc.zip |
comanchify all the simple cases - those that only load a profile. Rework permission checks for the profile sidebar so that it is all done internally. Remove crepair which we aren't using.
Diffstat (limited to 'include')
-rw-r--r-- | include/identity.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/identity.php b/include/identity.php index b25594c87..6bbf193c1 100644 --- a/include/identity.php +++ b/include/identity.php @@ -655,6 +655,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) { } } + if((x($profile,'address') == 1) || (x($profile,'locality') == 1) || (x($profile,'region') == 1) @@ -666,6 +667,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) { $marital = ((x($profile,'marital') == 1) ? t('Status:') : False); $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False); + if(! perm_is_allowed($profile['uid'],((is_array($observer)) ? $observer['xchan_hash'] : ''),'view_profile')) { + $block = true; + } + if(($profile['hidewall'] || $block) && (! local_user()) && (! remote_user())) { $location = $pdesc = $gender = $marital = $homepage = False; } @@ -688,7 +693,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) { $channel_menu = menu_render($m); } $menublock = get_pconfig($profile['uid'],'system','channel_menublock'); - if ($menublock) { + if ($menublock && (! $block)) { require_once('include/comanche.php'); $channel_menu .= comanche_block($menublock); } |