From 44b542814a0723ecd738ca02fad2e71d878197be Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 15 Oct 2015 10:29:39 +0200 Subject: if photo deleted from /cloud or /dav also delete from /photos --- include/attach.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/attach.php') diff --git a/include/attach.php b/include/attach.php index 0d4e4092b..f95feed2d 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1282,6 +1282,11 @@ function attach_delete($channel_id, $resource, $is_photo = 0) { ); if($x) { drop_item($x[0]['id'],false,(($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1),true); + + q("DELETE FROM photo WHERE uid = %d AND resource_id = '%s'", + intval($channel_id), + dbesc($resource) + ); } } -- cgit v1.2.3