From 5d70d889e908a32c846b9da3eb26703064d20ec6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 10 Apr 2019 13:25:03 +0200 Subject: Revert "Update htconfig.sample.php" This reverts commit f2126ef18c8b66020305d07dcefeacc4e55a3c12 --- include/attach.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/attach.php') diff --git a/include/attach.php b/include/attach.php index f6594b154..f169e0669 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1521,6 +1521,17 @@ function attach_drop_photo($channel_id,$resource) { if($x) { drop_item($x[0]['id'],false,(($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1),true); } + + $r = q("SELECT content FROM photo WHERE resource_id = '%s' AND uid = %d AND os_storage = 1", + dbesc($resource), + intval($channel_id) + ); + if($r) { + foreach($r as $i) { + @unlink(dbunescbin($i['content'])); + } + } + q("DELETE FROM photo WHERE uid = %d AND resource_id = '%s'", intval($channel_id), dbesc($resource) -- cgit v1.2.3