aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-15 15:24:51 -0800
committerzotlabs <mike@macgirvin.com>2017-01-15 15:24:51 -0800
commitb20cce1408445a48e8aec133b6df44bcd71c6321 (patch)
treece27352fc7b7c3857843634a05b073245a7c5d6f /Zotlabs/Module
parente843d27f8c4cd3ecabc3598a92db0c814f4d0ed7 (diff)
downloadvolse-hubzilla-b20cce1408445a48e8aec133b6df44bcd71c6321.tar.gz
volse-hubzilla-b20cce1408445a48e8aec133b6df44bcd71c6321.tar.bz2
volse-hubzilla-b20cce1408445a48e8aec133b6df44bcd71c6321.zip
attach_delete() - remove photo resources even if the attach table row wasn't found.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Photos.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index ef1eee399..582174d0e 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -188,13 +188,12 @@ class Photos extends \Zotlabs\Web\Controller {
}
if((argc() > 2) && (x($_REQUEST,'delete')) && ($_REQUEST['delete'] === t('Delete Photo'))) {
-
// same as above but remove single photo
$ob_hash = get_observer_hash();
if(! $ob_hash)
goaway(z_root() . '/' . $_SESSION['photo_return']);
-
+
$r = q("SELECT id, resource_id FROM photo WHERE ( xchan = '%s' or uid = %d ) AND resource_id = '%s' LIMIT 1",
dbesc($ob_hash),
intval(local_channel()),