diff options
author | zotlabs <mike@macgirvin.com> | 2019-04-15 20:53:44 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-04-15 20:53:44 -0700 |
commit | df5a1c59e6d2a0921de177aabacbee674d7385da (patch) | |
tree | 659c8b64743ac4cb894820eaa0f3ca47329b13d3 /include/attach.php | |
parent | 0615709a7ab7bba66b2a07d593e84a35ed083edb (diff) | |
parent | 71f17a233e29a45304f43ee2329bfff1865c6917 (diff) | |
download | volse-hubzilla-df5a1c59e6d2a0921de177aabacbee674d7385da.tar.gz volse-hubzilla-df5a1c59e6d2a0921de177aabacbee674d7385da.tar.bz2 volse-hubzilla-df5a1c59e6d2a0921de177aabacbee674d7385da.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 11 |
1 files changed, 11 insertions, 0 deletions
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) |