From b20cce1408445a48e8aec133b6df44bcd71c6321 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 15 Jan 2017 15:24:51 -0800 Subject: attach_delete() - remove photo resources even if the attach table row wasn't found. --- Zotlabs/Module/Photos.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Zotlabs') 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()), -- cgit v1.2.3