diff options
author | friendica <info@friendica.com> | 2014-10-21 16:33:35 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-10-21 16:33:35 -0700 |
commit | ed7712cfbf9835368de79f8686954b536c12e4d1 (patch) | |
tree | a1b141841fba7299cbe78b449c709d99e5e548b5 | |
parent | e8a7fb3d015b36af31312daf50739cf73f0f4368 (diff) | |
download | volse-hubzilla-ed7712cfbf9835368de79f8686954b536c12e4d1.tar.gz volse-hubzilla-ed7712cfbf9835368de79f8686954b536c12e4d1.tar.bz2 volse-hubzilla-ed7712cfbf9835368de79f8686954b536c12e4d1.zip |
private forum issues
-rw-r--r-- | include/identity.php | 3 | ||||
-rwxr-xr-x | include/items.php | 1 | ||||
-rw-r--r-- | mod/item.php | 15 | ||||
-rw-r--r-- | version.inc | 2 |
4 files changed, 19 insertions, 2 deletions
diff --git a/include/identity.php b/include/identity.php index 07bfaebbd..8866b4811 100644 --- a/include/identity.php +++ b/include/identity.php @@ -389,7 +389,8 @@ function create_identity($arr) { dbesc( t('Friends') ) ); if($r) { - q("update channel set channel_allow_gid = '%s' where channel_id = %d limit 1", + q("update channel set channel_default_group = '%s', channel_allow_gid = '%s' where channel_id = %d limit 1", + dbesc($r[0]['hash']), dbesc('<' . $r[0]['hash'] . '>'), intval($newuid) ); diff --git a/include/items.php b/include/items.php index 40343d505..75eaecb20 100755 --- a/include/items.php +++ b/include/items.php @@ -98,6 +98,7 @@ function collect_recipients($item,&$private_envelope) { } } + // This is a somewhat expensive operation but important. // Don't send this item to anybody who isn't allowed to see it 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 diff --git a/version.inc b/version.inc index 5a2540b37..a9ceeba21 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-10-20.834 +2014-10-21.835 |