From 8e488e291347857407dbedaf05d63941701d82d2 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 14 Dec 2020 21:56:19 +0000 Subject: handle removal of terms in attach_delete() when deleting a ressource --- Zotlabs/Module/Attach_edit.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'Zotlabs/Module/Attach_edit.php') diff --git a/Zotlabs/Module/Attach_edit.php b/Zotlabs/Module/Attach_edit.php index 0a41dbb22..667a0b7aa 100644 --- a/Zotlabs/Module/Attach_edit.php +++ b/Zotlabs/Module/Attach_edit.php @@ -110,15 +110,7 @@ class Attach_edit extends Controller { if ($delete) { attach_delete($channel_id, $resource, $is_photo); - - q("DELETE FROM term WHERE uid = %d AND oid = %d AND otype = %d", - intval($channel_id), - intval($attach_id), - intval(TERM_OBJ_FILE) - ); - $actions_done .= 'delete,'; - } if ($copy) { @@ -161,9 +153,8 @@ class Attach_edit extends Controller { store_item_tag($channel_id, $attach_id, TERM_OBJ_FILE, TERM_CATEGORY, $term, $term_link); } } + $actions_done .= 'cat_add,'; } - $actions_done .= 'cat_add,'; - } else { q("DELETE FROM term WHERE uid = %d AND oid = %d AND otype = %d", -- cgit v1.2.3