aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-10 13:25:03 +0200
committerMario <mario@mariovavti.com>2019-04-10 13:25:03 +0200
commit5d70d889e908a32c846b9da3eb26703064d20ec6 (patch)
tree2bf3365bec1b814fa0d2f4d407dd75c96bc0762a /include/attach.php
parent47fd95db9d2edc21f113e5843d87af9d9b62b243 (diff)
downloadvolse-hubzilla-5d70d889e908a32c846b9da3eb26703064d20ec6.tar.gz
volse-hubzilla-5d70d889e908a32c846b9da3eb26703064d20ec6.tar.bz2
volse-hubzilla-5d70d889e908a32c846b9da3eb26703064d20ec6.zip
Revert "Update htconfig.sample.php"
This reverts commit f2126ef18c8b66020305d07dcefeacc4e55a3c12
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php11
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)