aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-28 00:42:01 -0700
committerFriendika <info@friendika.com>2011-05-28 00:42:01 -0700
commit4e8a97f30a585eb707081a9216f840eb443a8764 (patch)
treeca7979c8ce7abbc4dd171dd8121f38628e93bdd5 /mod/photos.php
parentb0c383a6d0464c997203aa4da9bfc3c0417e54cf (diff)
downloadvolse-hubzilla-4e8a97f30a585eb707081a9216f840eb443a8764.tar.gz
volse-hubzilla-4e8a97f30a585eb707081a9216f840eb443a8764.tar.bz2
volse-hubzilla-4e8a97f30a585eb707081a9216f840eb443a8764.zip
bug #38 posts and photos only visible to friends if so configured
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 89fef2ee8..1fb6ee581 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -722,6 +722,8 @@ function photos_content(&$a) {
$owner_uid = $a->data['user']['uid'];
+
+
$community_page = (($a->data['user']['page-flags'] == PAGE_COMMUNITY) ? true : false);
if((local_user()) && (local_user() == $owner_uid))
@@ -763,6 +765,15 @@ function photos_content(&$a) {
}
}
+ $r = q("SELECT `hidewall` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
+ intval($owner_uid)
+ );
+
+ if(count($r) && $r[0]['hidewall'] && (local_user() !== $owner_uid) && (! remote_contact)) {
+ notice( t('Access to this item is restricted.') . EOL);
+ return;
+ }
+
// default permissions - anonymous user
$sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' ";