diff options
author | Mario Vavti <mario@mariovavti.com> | 2021-10-04 13:31:26 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2021-10-04 13:31:26 +0200 |
commit | 404ebd4d5e7a04f3e3a48bcf95b80774a96a4344 (patch) | |
tree | 4178ee83f3c490ecc06ca3f44d8feb11e752e1c9 /include | |
parent | 6da7fe7d27b30f691c07e5fb767afc904c3063c0 (diff) | |
download | volse-hubzilla-404ebd4d5e7a04f3e3a48bcf95b80774a96a4344.tar.gz volse-hubzilla-404ebd4d5e7a04f3e3a48bcf95b80774a96a4344.tar.bz2 volse-hubzilla-404ebd4d5e7a04f3e3a48bcf95b80774a96a4344.zip |
app sync fixes - part 2
Diffstat (limited to 'include')
-rw-r--r-- | include/import.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/import.php b/include/import.php index 3bd2af4ce..c986eeaef 100644 --- a/include/import.php +++ b/include/import.php @@ -590,7 +590,7 @@ function import_sysapps($channel, $apps) { */ function sync_sysapps($channel, $apps) { - $sysapps = Apps::get_system_apps(false); + $sysapps = Apps::get_system_apps(false, true); if ($channel && $apps) { @@ -606,7 +606,8 @@ function sync_sysapps($channel, $apps) { } foreach ($sysapps as $sysapp) { - if ($app['app_id'] === hash('whirlpool',$sysapp['app_name'])) { + + if ($app['app_id'] === hash('whirlpool', $sysapp['name'])) { if (array_key_exists('app_deleted',$app) && $app['app_deleted'] && $app['app_id']) { q("update app set app_deleted = 1 where app_id = '%s' and app_channel = %d", dbesc($app['app_id']), @@ -617,13 +618,12 @@ function sync_sysapps($channel, $apps) { // install this app on this server $newapp = $sysapp; $newapp['uid'] = $channel['channel_id']; - $newapp['guid'] = hash('whirlpool',$newapp['name']); - + $newapp['guid'] = hash('whirlpool', $newapp['name']); $newapp['system'] = 1; if ($term) { - $newapp['categories'] = array_elm_to_str($term,'term'); + $newapp['categories'] = array_elm_to_str($term, 'term'); } - Apps::app_install($channel['channel_id'],$newapp); + Apps::app_install($channel['channel_id'], $newapp); } } } |