diff options
author | Mario <mario@mariovavti.com> | 2021-10-04 09:24:13 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-10-04 09:24:13 +0000 |
commit | 6da7fe7d27b30f691c07e5fb767afc904c3063c0 (patch) | |
tree | 56663123eb76209dbb95c4de7eece010cc68b509 /Zotlabs | |
parent | 538e54053126ed4adf200802fb9298ec3212b085 (diff) | |
download | volse-hubzilla-6da7fe7d27b30f691c07e5fb767afc904c3063c0.tar.gz volse-hubzilla-6da7fe7d27b30f691c07e5fb767afc904c3063c0.tar.bz2 volse-hubzilla-6da7fe7d27b30f691c07e5fb767afc904c3063c0.zip |
provide system app sync
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 9 | ||||
-rw-r--r-- | Zotlabs/Lib/Libsync.php | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 3c09adaa5..89be58311 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -635,13 +635,18 @@ class Apps { intval($uid) ); if($r) { - if(($app['uid']) && (! $r[0]['app_system'])) { + if($app['uid']) { if($app['categories'] && (! $app['term'])) { $r[0]['term'] = q("select * from term where otype = %d and oid = %d", intval(TERM_OBJ_APP), intval($r[0]['id']) ); - Libsync::build_sync_packet($uid,array('app' => $r[0])); + } + if (intval($r[0]['app_system'])) { + Libsync::build_sync_packet($uid, ['sysapp' => $r[0]]); + } + else { + Libsync::build_sync_packet($uid, ['app' => $r[0]]); } } } diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 2b47fcf1a..e08f14447 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -246,6 +246,10 @@ class Libsync { if (array_key_exists('app', $arr) && $arr['app']) sync_apps($channel, $arr['app']); + if (array_key_exists('sysapp',$arr) && $arr['sysapp']) { + sync_sysapps($channel,$arr['sysapp']); + } + if (array_key_exists('addressbook', $arr) && $arr['addressbook']) sync_addressbook($channel, $arr['addressbook']); |