aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-06-20 17:32:10 +0200
committerMario <mario@mariovavti.com>2019-06-20 17:32:10 +0200
commit5b727065cf650a982bca0252b36a70acb80d904d (patch)
tree7eb3c6d68a596d334b55149a748032cac370564d /include
parent8c92b0cd3aaefde7a960fa1811021da247a4e28f (diff)
parent952e466d9121726f00c94b6527ff01255529b82c (diff)
downloadvolse-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 'include')
-rwxr-xr-xinclude/items.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/items.php b/include/items.php
index 0af119cc9..d2dba9677 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1988,11 +1988,12 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
unset($arr['iconfig']);
}
-
- if(strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid) || strlen($public_policy))
- $private = 1;
- else
- $private = $arr['item_private'];
+ $private = intval($arr['item_private']);
+ if (! $private) {
+ if (strlen($allow_cid) || strlen($allow_gid) || strlen($deny_cid) || strlen($deny_gid)) {
+ $private = 1;
+ }
+ }
$arr['parent'] = $parent_id;
$arr['allow_cid'] = $allow_cid;
@@ -4615,12 +4616,12 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
if(strpos($access_tag,'cid:') === 0) {
$str_contact_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = '';
- $private = 1;
+ $private = 2;
}
elseif(strpos($access_tag,'gid:') === 0) {
$str_group_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = '';
- $private = 1;
+ $private = 2;
}
}
}