preserve existing categories when updating an app from an embed source

This commit is contained in:
zotlabs 2018-03-24 21:17:15 -07:00
parent d4e91d5d9b
commit bb4f9eecbe

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),