fix private photos that also have a size specification

This commit is contained in:
friendica 2012-05-30 01:52:58 -07:00
parent 88a0d6a1d5
commit e5a988f0b5

View file

@ -2933,8 +2933,8 @@ function fix_private_photos($s,$uid, $item = null, $cid = 0) {
logger('fix_private_photos', LOGGER_DEBUG); logger('fix_private_photos', LOGGER_DEBUG);
$site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')); $site = substr($a->get_baseurl(),strpos($a->get_baseurl(),'://'));
if(preg_match("/\[img\](.*?)\[\/img\]/is",$s,$matches)) { if(preg_match("/\[img(.*?)\](.*?)\[\/img\]/is",$s,$matches)) {
$image = $matches[1]; $image = $matches[2];
logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG); logger('fix_private_photos: found photo ' . $image, LOGGER_DEBUG);
if(stristr($image , $site . '/photo/')) { if(stristr($image , $site . '/photo/')) {
$replace = false; $replace = false;