]> git.mxchange.org Git - friendica.git/commitdiff
fix private photos that also have a size specification
authorfriendica <info@friendica.com>
Wed, 30 May 2012 08:52:58 +0000 (01:52 -0700)
committerfriendica <info@friendica.com>
Wed, 30 May 2012 08:52:58 +0000 (01:52 -0700)
include/items.php

index c6d852fe7315266ca6c82ff963db4b9378dd1f60..8324d4bdd9363e06c735862d9269a5a5c112752e 100644 (file)
@@ -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;