honour hidden profiles on display item page

This commit is contained in:
Friendika 2011-07-05 21:11:38 -07:00
parent 40aa6f33b5
commit c221d5ea59
1 changed files with 7 additions and 2 deletions

View File

@ -26,8 +26,6 @@ function display_content(&$a) {
return; return;
} }
$groups = array(); $groups = array();
$contact = null; $contact = null;
@ -59,6 +57,13 @@ function display_content(&$a) {
if(count($r)) if(count($r))
$a->page_contact = $r[0]; $a->page_contact = $r[0];
$is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) {
notice( t('Access to this profile has been restricted.') . EOL);
return;
}
$sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups); $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,