aboutsummaryrefslogtreecommitdiffstats
path: root/mod/community.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-20 14:55:18 -0700
committerfriendica <info@friendica.com>2012-03-20 14:55:18 -0700
commit92ef36ad61bc96905b062a727d1f4558ed734bdb (patch)
tree56fe93f5a2b4ae5961fefc55ec7809ea70c92334 /mod/community.php
parent9df797299320cea01c541bb4997e498f915f98fa (diff)
downloadvolse-hubzilla-92ef36ad61bc96905b062a727d1f4558ed734bdb.tar.gz
volse-hubzilla-92ef36ad61bc96905b062a727d1f4558ed734bdb.tar.bz2
volse-hubzilla-92ef36ad61bc96905b062a727d1f4558ed734bdb.zip
slightly relax overly strict permissions in community and search to match those in display - tl;dr public conversations are publicly visible
Diffstat (limited to 'mod/community.php')
-rwxr-xr-xmod/community.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/mod/community.php b/mod/community.php
index a98999942..cf459617e 100755
--- a/mod/community.php
+++ b/mod/community.php
@@ -41,15 +41,16 @@ function community_content(&$a, $update = 0) {
// Here is the way permissions work in this module...
- // Only public wall posts can be shown
+ // Only public posts can be shown
// OR your own posts if you are a logged in member
$r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
- AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
- AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0
+ AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
+ AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
+ AND `item`.`private` = 0 AND `user`.`hidewall` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 "
);
@@ -69,8 +70,9 @@ function community_content(&$a, $update = 0) {
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
- AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
- AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0
+ AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = ''
+ AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
+ AND `item`.`private` = 0 AND `user`.`hidewall` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
ORDER BY `received` DESC LIMIT %d, %d ",
intval($a->pager['start']),