]> git.mxchange.org Git - friendica.git/commitdiff
honour hidden profiles on display item page
authorFriendika <info@friendika.com>
Wed, 6 Jul 2011 04:11:38 +0000 (21:11 -0700)
committerFriendika <info@friendika.com>
Wed, 6 Jul 2011 04:11:38 +0000 (21:11 -0700)
mod/display.php

index 305a21825f5420a0ba1a069588fe766640b0a66a..159ff57edfb8cef90d21b8c717860c86fe9458b3 100644 (file)
@@ -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`,