aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-24 21:17:15 -0700
committerMario Vavti <mario@mariovavti.com>2018-04-05 09:32:51 +0200
commitf22c7afc59d0f6650594127cf45e8770723b1b20 (patch)
tree39d484cd9af6f544235f1517eda2740f075e430e /Zotlabs
parentd7aa24fd2d35d8d6c737df9050613efa4c8ae7dd (diff)
downloadvolse-hubzilla-f22c7afc59d0f6650594127cf45e8770723b1b20.tar.gz
volse-hubzilla-f22c7afc59d0f6650594127cf45e8770723b1b20.tar.bz2
volse-hubzilla-f22c7afc59d0f6650594127cf45e8770723b1b20.zip
preserve existing categories when updating an app from an embed source
Diffstat (limited to 'Zotlabs')
-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),