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:
friendica
2013-12-11 14:54:36 -08:00
parent 652959678f
commit 40e2900326
16 changed files with 74 additions and 325 deletions

View File

@@ -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);
}