also sync the undestroy action

This commit is contained in:
Mario Vavti
2021-10-04 20:32:19 +02:00
parent 3a38946f8a
commit 4b48ff2868

View File

@@ -742,13 +742,13 @@ class Apps {
dbesc($app['guid']),
intval($uid)
);
if($x) {
if($x[0]['app_system']) {
q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
}
if($x && intval($x[0]['app_deleted']) && $x[0]['app_system']) {
q("update app set app_deleted = 0 where app_id = '%s' and app_channel = %d",
dbesc($app['guid']),
intval($uid)
);
$x[0]['app_deleted'] = 0;
Libsync::build_sync_packet($uid, ['sysapp' => $x]);
}
}
}