preserve existing categories when updating an app from an embed source

This commit is contained in:
zotlabs
2018-04-05 09:32:51 +02:00
committed by Mario Vavti
parent d7aa24fd2d
commit f22c7afc59
+6
View File
@@ -872,6 +872,12 @@ class Apps {
dbesc($darray['app_id']),
intval($darray['app_channel'])
);
// if updating an embed app, don't mess with any existing categories.
if(array_key_exists('embed',$arr) && intval($arr['embed']))
return $ret;
if($x) {
q("delete from term where otype = %d and oid = %d",
intval(TERM_OBJ_APP),