1
0
Fork 0

Changed "hidewall" behaviour

This commit is contained in:
Michael 2019-09-18 05:20:33 +00:00
commit 1144863090
3 changed files with 6 additions and 9 deletions

View file

@ -237,9 +237,9 @@ function community_getitems($start, $itemspage, $content, $accounttype)
return DBA::toArray($r);
} elseif ($content == 'global') {
if (!is_null($accounttype)) {
$condition = ["`uid` = ? AND `owner`.`contact-type` = ?", 0, $accounttype];
$condition = ["`uid` = ? AND NOT `author`.`unsearchable` AND NOT `owner`.`unsearchable` AND `owner`.`contact-type` = ?", 0, $accounttype];
} else {
$condition = ['uid' => 0];
$condition = ["`uid` = ? AND NOT `author`.`unsearchable` AND NOT `owner`.`unsearchable`", 0];
}
$r = Item::selectThreadForUser(0, ['uri'], $condition, ['order' => ['commented' => true], 'limit' => [$start, $itemspage]]);

View file

@ -284,10 +284,6 @@ function item_post(App $a) {
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
if ($user['hidewall']) {
$private = 2;
}
// If this is a comment, set the permissions from the parent.
if ($toplevel_item) {