aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-10-15 10:29:39 +0200
committerMario Vavti <mario@mariovavti.com>2015-10-15 10:29:39 +0200
commit44b542814a0723ecd738ca02fad2e71d878197be (patch)
tree13cb6f51ee6ad793f6b6de2a0b64ed5744f65520 /include
parent2848f5dab4e0f904280e77d6403ab69926cabe1d (diff)
downloadvolse-hubzilla-44b542814a0723ecd738ca02fad2e71d878197be.tar.gz
volse-hubzilla-44b542814a0723ecd738ca02fad2e71d878197be.tar.bz2
volse-hubzilla-44b542814a0723ecd738ca02fad2e71d878197be.zip
if photo deleted from /cloud or /dav also delete from /photos
Diffstat (limited to 'include')
-rw-r--r--include/attach.php5
1 files changed, 5 insertions, 0 deletions
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)
+ );
}
}