aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-08-11 10:39:03 +0200
committerManuel Jiménez Friaza <mjfriaza@openmailbox.org>2019-08-11 10:39:03 +0200
commitb89d2d7580e40cd417defaffd2514b5eed38577d (patch)
tree78ba9004d87b994dd9a531b475fd51b940bf3dd8 /include/attach.php
parent350e636e3d0a44323c69185555e89cc01a213aa2 (diff)
parent047dd31724f8da12c153b4a6f27dc5462f7b97e5 (diff)
downloadvolse-hubzilla-b89d2d7580e40cd417defaffd2514b5eed38577d.tar.gz
volse-hubzilla-b89d2d7580e40cd417defaffd2514b5eed38577d.tar.bz2
volse-hubzilla-b89d2d7580e40cd417defaffd2514b5eed38577d.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php
index f169e0669..80efe0838 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1514,12 +1514,15 @@ function attach_delete($channel_id, $resource, $is_photo = 0) {
function attach_drop_photo($channel_id,$resource) {
- $x = q("select id, item_hidden from item where resource_id = '%s' and resource_type = 'photo' and uid = %d",
+ $x = q("select id, item_hidden from item where resource_id = '%s' and resource_type = 'photo' and uid = %d and item_deleted = 0",
dbesc($resource),
intval($channel_id)
);
+
if($x) {
- drop_item($x[0]['id'],false,(($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1),true);
+ $stage = (($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1);
+ $interactive = (($x[0]['item_hidden']) ? false : true);
+ drop_item($x[0]['id'], $interactive, $stage);
}
$r = q("SELECT content FROM photo WHERE resource_id = '%s' AND uid = %d AND os_storage = 1",