aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index fb82c4873..fecaa7ad2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1637,11 +1637,9 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
}
}
-
- $ab = q("select * from abook where abook_channel = %d
- and abook_xchan = '%s'",
+ $ab = q("select * from abook where abook_channel = %d and abook_xchan = '%s'",
intval($channel['channel_id']),
- $arr['owner_xchan']
+ dbesc($arr['owner_xchan'])
);
$abook = (($ab) ? $ab[0] : null);
@@ -2843,6 +2841,8 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
*/
function process_channel_sync_delivery($sender, $arr, $deliveries) {
+ require_once('include/import.php');
+
/** @FIXME this will sync red structures (channel, pconfig and abook). Eventually we need to make this application agnostic. */
$result = array();
@@ -2875,6 +2875,12 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
}
}
+ if(array_key_exists('obj',$arr) && $arr['obj'])
+ sync_objs($channel,$arr['obj']);
+
+ if(array_key_exists('app',$arr) && $arr['app'])
+ sync_apps($channel,$arr['app']);
+
if(array_key_exists('channel',$arr) && is_array($arr['channel']) && count($arr['channel'])) {
if(array_key_exists('channel_page_flags',$arr['channel']) && intval($arr['channel']['channel_pageflags'])) {
$arr['channel']['channel_removed'] = (($arr['channel']['channel_pageflags'] & 0x8000) ? 1 : 0);