this will probably fix the uploaded photo permission issue, if not it should be close

This commit is contained in:
friendica 2014-03-27 15:56:31 -07:00
parent 6efb0a7cb3
commit 2b6feeb835

View File

@ -1077,8 +1077,8 @@ function fix_attached_photo_permissions($uid,$xchan_hash,$body,
$match = null; $match = null;
// match img and zmg image links // match img and zmg image links
if(preg_match_all("/\[[zi]mg\](.*?)\[\/[zi]mg\]/",$body,$match)) { if(preg_match_all("/\[[zi]mg(.*?)\](.*?)\[\/[zi]mg\]/",$body,$match)) {
$images = $match[1]; $images = $match[2];
if($images) { if($images) {
foreach($images as $image) { foreach($images as $image) {
if(! stristr($image,get_app()->get_baseurl() . '/photo/')) if(! stristr($image,get_app()->get_baseurl() . '/photo/'))