From 1cc1bc8e811ccee8dedd340dcaa156c7c1a3fed1 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 7 Nov 2014 05:15:39 -0800 Subject: fix broken photo edits when adult flag is changed --- mod/photos.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 0a3d6c704..9d8e68134 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -274,11 +274,9 @@ function photos_post(&$a) { } } - $p = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `uid` = %d and ((photo_flags = %d) or (photo_flags & %d )) ORDER BY `scale` DESC", + $p = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `uid` = %d ORDER BY `scale` DESC", dbesc($resource_id), - intval($page_owner_uid), - intval(PHOTO_NORMAL), - intval(PHOTO_PROFILE) + intval($page_owner_uid) ); if($p) { $ext = $phototypes[$p[0]['type']]; @@ -322,10 +320,11 @@ function photos_post(&$a) { intval($item_id), intval($page_owner_uid) ); - } - if($r) { - $old_tag = $r[0]['tag']; - $old_inform = $r[0]['inform']; + + if($r) { + $old_tag = $r[0]['tag']; + $old_inform = $r[0]['inform']; + } } -- cgit v1.2.3