From 11ea7bf0fc7f35cb205e0de40622c88a0bed9f66 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 4 Oct 2021 11:25:52 +0000 Subject: app sync fixes - part 1 --- Zotlabs/Lib/Apps.php | 12 ++++++++---- Zotlabs/Lib/Libsync.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 89be58311..b903da16b 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -643,10 +643,10 @@ class Apps { ); } if (intval($r[0]['app_system'])) { - Libsync::build_sync_packet($uid, ['sysapp' => $r[0]]); + Libsync::build_sync_packet($uid, ['sysapp' => $r]); } else { - Libsync::build_sync_packet($uid, ['app' => $r[0]]); + Libsync::build_sync_packet($uid, ['app' => $r]); } } } @@ -711,8 +711,12 @@ class Apps { intval($uid) ); } - if(! intval($x[0]['app_system'])) { - Libsync::build_sync_packet($uid,array('app' => $x)); + + if (intval($x[0]['app_system'])) { + Libsync::build_sync_packet($uid, ['sysapp' => $x]); + } + else { + Libsync::build_sync_packet($uid, ['app' => $x]); } } else { diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index e08f14447..1157428b4 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -247,7 +247,7 @@ class Libsync { sync_apps($channel, $arr['app']); if (array_key_exists('sysapp',$arr) && $arr['sysapp']) { - sync_sysapps($channel,$arr['sysapp']); + sync_sysapps($channel, $arr['sysapp']); } if (array_key_exists('addressbook', $arr) && $arr['addressbook']) -- cgit v1.2.3