From 5ad76c4d0c2227e8e241a52b75abedc7503523ac Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 14 Jul 2014 02:37:41 -0700 Subject: the sending side of clone syncing of collection/privacy_group information. The receiving side is not yet implemented. --- include/zot.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 798ebc0af..4442bd748 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2041,7 +2041,7 @@ function import_site($arr,$pubkey) { * such things as personal settings, channel permissions, address book updates, etc. */ -function build_sync_packet($uid = 0, $packet = null) { +function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) { $a = get_app(); @@ -2118,6 +2118,20 @@ function build_sync_packet($uid = 0, $packet = null) { } } + if($groups_changed) { + $r = q("select * from groups where uid = %d", + intval($uid) + ); + if($r) + $info['collections'] = $r; + $r = q("select * from group_member where uid = %d", + intval($uid) + ); + if($r) + $info['collection_members'] = $r; + + } + $interval = ((get_config('system','delivery_interval') !== false) ? intval(get_config('system','delivery_interval')) : 2 ); -- cgit v1.2.3