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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user