aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-06-18 17:07:20 -0700
committerzotlabs <mike@macgirvin.com>2018-06-18 17:07:20 -0700
commitf801f5227459564888a0d35fd65a1d2c4c685df3 (patch)
tree5d2e0b0bfc784faced533e009eae4a04a0a5ac0f /include/items.php
parent36d73b3da9eda9539a851c1a1e697db9ffa7d935 (diff)
downloadvolse-hubzilla-f801f5227459564888a0d35fd65a1d2c4c685df3.tar.gz
volse-hubzilla-f801f5227459564888a0d35fd65a1d2c4c685df3.tar.bz2
volse-hubzilla-f801f5227459564888a0d35fd65a1d2c4c685df3.zip
provide flag to collect_recipients to exclude privacy groups (for federation plugin use)
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index caf70b294..51a26f78c 100755
--- a/include/items.php
+++ b/include/items.php
@@ -19,9 +19,10 @@ require_once('include/permissions.php');
*
* @param array $item
* @param[out] boolean $private_envelope
+ * @param boolean $include_groups
* @return array containing the recipients
*/
-function collect_recipients($item, &$private_envelope) {
+function collect_recipients($item, &$private_envelope,$include_groups = true) {
require_once('include/group.php');
@@ -34,7 +35,12 @@ function collect_recipients($item, &$private_envelope) {
$allow_people = expand_acl($item['allow_cid']);
- $allow_groups = expand_groups(expand_acl($item['allow_gid']));
+ if($include_groups) {
+ $allow_groups = expand_groups(expand_acl($item['allow_gid']));
+ }
+ else {
+ $allow_groups = [];
+ }
$recipients = array_unique(array_merge($allow_people,$allow_groups));