From daa4f5213f726b22846859f2f12d06889e9bdc9b Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 3 Jun 2012 01:53:11 -0700 Subject: [PATCH] zrl's when visiting public photos at the source site --- include/conversation.php | 6 ++++++ 1 file changed, 6 insertions(+) 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']); + } + } } -- 2.39.5