From ed7712cfbf9835368de79f8686954b536c12e4d1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 21 Oct 2014 16:33:35 -0700 Subject: private forum issues --- mod/item.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index ac15e50e8..589e3beb1 100644 --- a/mod/item.php +++ b/mod/item.php @@ -257,10 +257,16 @@ function item_post(&$a) { killme(); } + $walltowall = false; + if($observer) { logger('mod_item: post accepted from ' . $observer['xchan_name'] . ' for ' . $owner_xchan['xchan_name'], LOGGER_DEBUG); + if($observer['xchan_name'] != $owner_xchan['xchan_name']) + $walltowall = true; } + + $public_policy = ((x($_REQUEST,'public_policy')) ? escape_tags($_REQUEST['public_policy']) : map_scope($channel['channel_r_stream'],true)); if($webpage) $public_policy = ''; @@ -329,6 +335,15 @@ function item_post(&$a) { $str_group_deny = $channel['channel_deny_gid']; $str_contact_deny = $channel['channel_deny_cid']; } + elseif($walltowall) { + + // use the channel owner's default permissions + + $str_group_allow = $channel['channel_allow_gid']; + $str_contact_allow = $channel['channel_allow_cid']; + $str_group_deny = $channel['channel_deny_gid']; + $str_contact_deny = $channel['channel_deny_cid']; + } else { // use the posted permissions -- cgit v1.2.3