From: friendica Date: Sat, 26 May 2012 00:42:35 +0000 (-0700) Subject: fix wall_uploaded photo permissions on group post by member X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ef8ccf11bbc6f353610b0a67c203a7f8438387b;p=friendica.git fix wall_uploaded photo permissions on group post by member --- diff --git a/mod/item.php b/mod/item.php index 81dd553cdb..df242d6f7c 100644 --- a/mod/item.php +++ b/mod/item.php @@ -355,13 +355,15 @@ function item_post(&$a) { $image_uri = substr($image_uri,0, strpos($image_uri,'-')); if(! strlen($image_uri)) continue; - $srch = '<' . intval($contact_record['id']) . '>'; + $srch = '<' . intval($contact_id) . '>'; + $r = q("SELECT `id` FROM `photo` WHERE `allow_cid` = '%s' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' AND `resource-id` = '%s' AND `uid` = %d LIMIT 1", dbesc($srch), dbesc($image_uri), intval($profile_uid) ); + if(! count($r)) continue;