aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-24 21:17:15 -0700
committerzotlabs <mike@macgirvin.com>2018-03-24 21:17:15 -0700
commitbb4f9eecbe88c5d6ead654cefefcd3c57f23c1fe (patch)
treee0057208e1a1f039b556d9aa47d7c72fe5ab0786
parentd4e91d5d9b6f71b20382a6fdc941337cb67b5a5b (diff)
downloadvolse-hubzilla-bb4f9eecbe88c5d6ead654cefefcd3c57f23c1fe.tar.gz
volse-hubzilla-bb4f9eecbe88c5d6ead654cefefcd3c57f23c1fe.tar.bz2
volse-hubzilla-bb4f9eecbe88c5d6ead654cefefcd3c57f23c1fe.zip
preserve existing categories when updating an app from an embed source
-rw-r--r--Zotlabs/Lib/Apps.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 950a82aca..24cb4a626 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -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),