aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-03-20 17:46:13 +0100
committerMario Vavti <mario@mariovavti.com>2015-03-20 17:46:13 +0100
commit264b43db05fe0a9a4ec4402eb43c7ecf501d4fee (patch)
tree4675452a78c3c801ff1776beb69e56d94f3fb723 /include
parent6698d7b03a88533eda8d79581b7e13565d36fa7e (diff)
downloadvolse-hubzilla-264b43db05fe0a9a4ec4402eb43c7ecf501d4fee.tar.gz
volse-hubzilla-264b43db05fe0a9a4ec4402eb43c7ecf501d4fee.tar.bz2
volse-hubzilla-264b43db05fe0a9a4ec4402eb43c7ecf501d4fee.zip
some cleanup
Diffstat (limited to 'include')
-rw-r--r--include/attach.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/include/attach.php b/include/attach.php
index 8ffb4bb96..7d0b99c05 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1043,15 +1043,10 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
//send update activity and create a new one
//updates should be sent to everybody with recursive perms and all eventual former allowed members ($object['allow_cid'] etc.).
- $o_arr_allow_cid = expand_acl($object['allow_cid']);
- $o_arr_allow_gid = expand_acl($object['allow_gid']);
- $o_arr_deny_cid = expand_acl($object['deny_cid']);
- $o_arr_deny_gid = expand_acl($object['deny_gid']);
- //merge arrays and remove duplicates
- $arr_allow_cid = array_unique(array_merge($arr_allow_cid, $o_arr_allow_cid));
- $arr_allow_gid = array_unique(array_merge($arr_allow_gid, $o_arr_allow_gid));
- $arr_deny_cid = array_unique(array_merge($arr_deny_cid, $o_arr_deny_cid));
- $arr_deny_gid = array_unique(array_merge($arr_deny_gid, $o_arr_deny_gid));
+ $u_arr_allow_cid = array_unique(array_merge($arr_allow_cid, expand_acl($object['allow_cid'])));
+ $u_arr_allow_gid = array_unique(array_merge($arr_allow_gid, expand_acl($object['allow_gid'])));
+ $u_arr_deny_cid = array_unique(array_merge($arr_deny_cid, expand_acl($object['deny_cid'])));
+ $u_arr_deny_gid = array_unique(array_merge($arr_deny_gid, expand_acl($object['deny_gid'])));
$u_mid = item_message_id();
@@ -1066,10 +1061,10 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid,
$arr['author_xchan'] = $poster['xchan_hash'];
$arr['owner_xchan'] = $poster['xchan_hash'];
$arr['title'] = '';
- $arr['allow_cid'] = perms2str($arr_allow_cid);
- $arr['allow_gid'] = perms2str($arr_allow_gid);
- $arr['deny_cid'] = perms2str($arr_deny_cid);
- $arr['deny_gid'] = perms2str($arr_deny_gid);
+ $arr['allow_cid'] = perms2str($u_arr_allow_cid);
+ $arr['allow_gid'] = perms2str($u_arr_allow_gid);
+ $arr['deny_cid'] = perms2str($u_arr_deny_cid);
+ $arr['deny_gid'] = perms2str($u_arr_deny_gid);
$arr['item_restrict'] = ITEM_HIDDEN;
$arr['item_private'] = 0;
$arr['verb'] = ACTIVITY_UPDATE;