aboutsummaryrefslogtreecommitdiffstats
path: root/mod/message.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-15 03:00:08 -0700
committerfriendica <info@friendica.com>2013-04-15 03:00:08 -0700
commit7e6890832b15d8417cb812cbaa00d3ed8c954ef0 (patch)
treeff94dd547504ac2f3a65a18bda3a8804fdb5da43 /mod/message.php
parentab5151c470e630aa3864bbed927dd02f7b192166 (diff)
downloadvolse-hubzilla-7e6890832b15d8417cb812cbaa00d3ed8c954ef0.tar.gz
volse-hubzilla-7e6890832b15d8417cb812cbaa00d3ed8c954ef0.tar.bz2
volse-hubzilla-7e6890832b15d8417cb812cbaa00d3ed8c954ef0.zip
turn all Red links into zrls (not the old zrls, the new bbcode zrl which means we can zidify them)
Diffstat (limited to 'mod/message.php')
-rw-r--r--mod/message.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/mod/message.php b/mod/message.php
index 94a8344ea..93b5c2494 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -160,9 +160,10 @@ function item_redir_and_replace_images($body, $images, $cid) {
$newbody = '';
for($i = 0; $i < count($images); $i++) {
- $search = '/\[url\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/url\]' . '/is';
- $replace = '[url=' . z_path() . '/redir/' . $cid
- . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/url]' ;
+ $search = '/\[zrl\=(.*?)\]\[!#saved_image' . $i . '#!\]\[\/zrl\]' . '/is';
+//FIXME
+ $replace = '[zrl=' . z_path() . '/redir/' . $cid
+ . '?f=1&url=' . '$1' . '][!#saved_image' . $i . '#!][/zrl]' ;
$img_end = strpos($origbody, '[!#saved_image' . $i . '#!][/url]') + strlen('[!#saved_image' . $i . '#!][/url]');
$process_part = substr($origbody, 0, $img_end);