diff options
author | Mario <mario@mariovavti.com> | 2019-06-20 17:32:10 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-06-20 17:32:10 +0200 |
commit | 5b727065cf650a982bca0252b36a70acb80d904d (patch) | |
tree | 7eb3c6d68a596d334b55149a748032cac370564d /Zotlabs/Module/Item.php | |
parent | 8c92b0cd3aaefde7a960fa1811021da247a4e28f (diff) | |
parent | 952e466d9121726f00c94b6527ff01255529b82c (diff) | |
download | volse-hubzilla-5b727065cf650a982bca0252b36a70acb80d904d.tar.gz volse-hubzilla-5b727065cf650a982bca0252b36a70acb80d904d.tar.bz2 volse-hubzilla-5b727065cf650a982bca0252b36a70acb80d904d.zip |
Merge branch 'dev' into 'dev'
changes to support direct messages in zot6 (set item.item_private = 2 when...
See merge request hubzilla/core!1679
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 965cbf173..901f54c72 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -551,10 +551,10 @@ class Item extends Controller { $public_policy = $orig_post['public_policy']; $private = $orig_post['item_private']; } - - if($private || $public_policy || $acl->is_private()) - $private = 1; - + + if($public_policy || $acl->is_private()) { + $private = (($private) ? $private : 1); + } $location = $orig_post['location']; $coord = $orig_post['coord']; @@ -631,12 +631,11 @@ class Item extends Controller { $allow_empty = ((array_key_exists('allow_empty',$_REQUEST)) ? intval($_REQUEST['allow_empty']) : 0); - $private = intval($acl->is_private() || ($public_policy)); + $private = (($private) ? $private : intval($acl->is_private() || ($public_policy))); // If this is a comment, set the permissions from the parent. if($parent_item) { - $private = 0; $acl->set($parent_item); $private = intval($acl->is_private() || $parent_item['item_private']); $public_policy = $parent_item['public_policy']; |