]> git.mxchange.org Git - friendica.git/commitdiff
zrl on mentions
authorfriendica <info@friendica.com>
Fri, 30 Mar 2012 04:08:10 +0000 (21:08 -0700)
committerfriendica <info@friendica.com>
Fri, 30 Mar 2012 04:08:10 +0000 (21:08 -0700)
include/conversation.php

index 37856651e17f266012a3c473c22b34d1a4c925cb..6283cfe0aef07f9196089298dd4200d941ad6d8b 100755 (executable)
@@ -166,6 +166,12 @@ function localize_item(&$item){
                        }
                }
        }
+       $matches = null;
+       if(preg_match_all('/@[url=(.*?)]/is',$item['body'],$matches,PREG_SET_ORDER)) {
+               foreach($matches as $mtch) {
+                       $item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']);
+               }
+       }
 
 }