aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-05 21:11:38 -0700
committerFriendika <info@friendika.com>2011-07-05 21:11:38 -0700
commitc221d5ea597040c27a8918f9c08629e979a6e273 (patch)
treeddefeb6408976bf4f1b0dde5141b42d3c2d9ee5b
parent40aa6f33b57ab110d8b6123716584ad075081335 (diff)
downloadvolse-hubzilla-c221d5ea597040c27a8918f9c08629e979a6e273.tar.gz
volse-hubzilla-c221d5ea597040c27a8918f9c08629e979a6e273.tar.bz2
volse-hubzilla-c221d5ea597040c27a8918f9c08629e979a6e273.zip
honour hidden profiles on display item page
-rw-r--r--mod/display.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/mod/display.php b/mod/display.php
index 305a21825..159ff57ed 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -26,8 +26,6 @@ function display_content(&$a) {
return;
}
-
-
$groups = array();
$contact = null;
@@ -59,6 +57,13 @@ function display_content(&$a) {
if(count($r))
$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);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,