From: friendica Date: Wed, 30 May 2012 08:52:58 +0000 (-0700) Subject: fix private photos that also have a size specification X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e5a988f0b58f3a2319863580817dc22545e2c498;p=friendica.git fix private photos that also have a size specification --- diff --git a/include/items.php b/include/items.php index c6d852fe73..8324d4bdd9 100644 --- a/include/items.php +++ b/include/items.php @@ -2933,8 +2933,8 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) { logger('fix_private_photos', LOGGER_DEBUG); $site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')); - if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) { - $image = $matches[1]; + if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/is",$s,$matches)) { + $image = $matches[2]; logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG); if(stristr($image , $site . '/photo/')) { $replace = false;