From 6c321be03c8edd062866b1775bca560beec9d602 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Dec 2013 15:35:13 -0800 Subject: reorganise a few included functions - notably identity related functions --- mod/profile.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index d59602ba0..cd5c3eeef 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -116,7 +116,6 @@ function profile_content(&$a, $update = 0) { $o .= profile_tabs($a, $is_owner, $a->profile['channel_address']); - require_once('include/profile_advanced.php'); $o .= advanced_profile($a); call_hooks('profile_advanced',$o); return $o; -- cgit v1.2.3 From d8903f09f5a6d637b4258632eee16859373e1893 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Dec 2013 00:19:29 -0800 Subject: include re-organisation and more doco, post_to_red fix ampersands in categories --- mod/profile.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index cd5c3eeef..a307905e6 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -1,4 +1,12 @@ - Date: Tue, 10 Dec 2013 23:27:17 -0800 Subject: cleanup and Comanchification of mod_profile --- mod/profile.php | 50 +++++--------------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index a307905e6..fca7c8f9f 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -43,72 +43,32 @@ function profile_init(&$a) { $a->profile = $x[0]; } } -// $channel_display = get_pconfig($a->profile['profile_uid'],'system','channel_format'); -// if(! $channel_display) - profile_load($a,$which,$profile); - - -} - - -function profile_aside(&$a) { + profile_load($a,$which,$profile); - profile_create_sidebar($a); } - function profile_content(&$a, $update = 0) { if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) { return login(); } - - $groups = array(); $tab = 'profile'; $o = ''; - - $contact = null; - $remote_contact = false; - - $contact_id = 0; - - if(is_array($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $v) { - if($v['uid'] == $a->profile['profile_uid']) { - $contact_id = $v['cid']; - break; - } - } - } - - if($contact_id) { - $groups = init_groups_visitor($contact_id); - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($contact_id), - intval($a->profile['profile_uid']) - ); - if(count($r)) { - $contact = $r[0]; - $remote_contact = true; - } + if(! (perm_is_allowed($a->profile['profile_uid'],get_observer_hash(), 'view_profile'))) { + notice( t('Access to this profile has been restricted.') . EOL); + return; } - if(! $remote_contact) { - if(local_user()) { - $contact_id = $_SESSION['cid']; - $contact = $a->contact; - } - } $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { + if($a->profile['hidewall'] && (! $is_owner) && (! remote_user())) { notice( t('Access to this profile has been restricted.') . EOL); return; } -- cgit v1.2.3