diff options
author | Wave <tuscanhobbit@users.noreply.github.com> | 2015-10-19 10:28:17 +0200 |
---|---|---|
committer | Wave <tuscanhobbit@users.noreply.github.com> | 2015-10-19 10:28:17 +0200 |
commit | 3e9b6a330d157ac8aa4831b57d33ec495345a9c7 (patch) | |
tree | 8c2539297a17b3f1409536b94dd4558c5a32bd08 /mod/item.php | |
parent | 319b02a757ced679d0eaf141cc40db585fa6f84b (diff) | |
parent | b54c4df74dd370c74d5822cdd00e0cf1ff52493f (diff) | |
download | volse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.tar.gz volse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.tar.bz2 volse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.zip |
Merge pull request #1 from redmatrix/master
Update to latest hubzilla
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mod/item.php b/mod/item.php index 93f24bd1a..7488e709b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -372,12 +372,23 @@ function item_post(&$a) { } else { - if((! $walltowall) && - ((array_key_exists('contact_allow',$_REQUEST)) - || (array_key_exists('group_allow',$_REQUEST)) - || (array_key_exists('contact_deny',$_REQUEST)) - || (array_key_exists('group_deny',$_REQUEST)))) { - $acl->set_from_array($_REQUEST); + if(! $walltowall) { + if((array_key_exists('contact_allow',$_REQUEST)) + || (array_key_exists('group_allow',$_REQUEST)) + || (array_key_exists('contact_deny',$_REQUEST)) + || (array_key_exists('group_deny',$_REQUEST))) { + $acl->set_from_array($_REQUEST); + } + elseif(! $api_source) { + + // if no ACL has been defined and we aren't using the API, the form + // didn't send us any parameters. This means there's no ACL or it has + // been reset to the default audience. + // If $api_source is set and there are no ACL parameters, we default + // to the channel permissions which were set in the ACL contructor. + + $acl->set(array('allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '')); + } } |