From: friendica Date: Sun, 3 Jun 2012 08:53:11 +0000 (-0700) Subject: zrl's when visiting public photos at the source site X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=daa4f5213f726b22846859f2f12d06889e9bdc9b;p=friendica.git zrl's when visiting public photos at the source site --- diff --git a/include/conversation.php b/include/conversation.php index 5c9b604e73..a9c6287a90 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -173,6 +173,12 @@ function localize_item(&$item){ $item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']); } } + if(preg_match_all('/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is',$item['body'],$matches,PREG_SET_ORDER)) { +logger('matched'); + foreach($matches as $mtch) { + $item['body'] = str_replace($mtch[0],'[url=' . zrl($mtch[1] . '/photos/' . $mtch[2] . '/image/' . $mtch[3] ,true) . '][img' . $mtch[4] . ']h' . $mtch[5] . '[/img][/url]',$item['body']); + } + } }