aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-03 01:53:11 -0700
committerfriendica <info@friendica.com>2012-06-03 01:53:11 -0700
commitdaa4f5213f726b22846859f2f12d06889e9bdc9b (patch)
tree525a6536b6ab7f9020e83daf9287c785303ad584
parent97576e3e33c1581ececc56588ae526d2990b092f (diff)
downloadvolse-hubzilla-daa4f5213f726b22846859f2f12d06889e9bdc9b.tar.gz
volse-hubzilla-daa4f5213f726b22846859f2f12d06889e9bdc9b.tar.bz2
volse-hubzilla-daa4f5213f726b22846859f2f12d06889e9bdc9b.zip
zrl's when visiting public photos at the source site
-rw-r--r--include/conversation.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 5c9b604e7..a9c6287a9 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']);
+ }
+ }
}