diff options
author | friendica <info@friendica.com> | 2013-10-30 17:34:16 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-30 17:34:16 -0700 |
commit | 400753b6ccfce66d6d88cefa7a7677016152a415 (patch) | |
tree | eeb09ceab27e7bcfbae51388909d64be683953a9 | |
parent | a5693df07fdf6fdf31247bfe0700d4c8096d4fbf (diff) | |
parent | 6af8fa36eec5000a7c267ff49cc9191b63a1ec16 (diff) | |
download | volse-hubzilla-400753b6ccfce66d6d88cefa7a7677016152a415.tar.gz volse-hubzilla-400753b6ccfce66d6d88cefa7a7677016152a415.tar.bz2 volse-hubzilla-400753b6ccfce66d6d88cefa7a7677016152a415.zip |
Merge https://github.com/friendica/red into zpull
-rw-r--r-- | include/bbcode.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index de8a34b80..9ca8e3f03 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -179,7 +179,11 @@ function bb_ShareAttributesSimple($match) { } function rpost_callback($match) { - return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&body=' . urlencode($match[1]),$match[0]); + if ($match[2]) { + return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&title=' . urlencode($match[2]) . '&body=' . urlencode($match[3]),$match[0]); + } else { + return str_replace($match[0],get_rpost_path(get_app()->get_observer()) . '&body=' . urlencode($match[3]),$match[0]); + } } @@ -229,11 +233,11 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { if ($observer) { $Text = preg_replace("/\[observer\=1\](.*?)\[\/observer\]/ism", '$1', $Text); $Text = preg_replace("/\[observer\=0\].*?\[\/observer\]/ism", '', $Text); - $Text = preg_replace_callback("/\[rpost\](.*?)\[\/rpost\]/ism", 'rpost_callback', $Text); + $Text = preg_replace_callback("/\[rpost(=(.*?))?\](.*?)\[\/rpost\]/ism", 'rpost_callback', $Text); } else { $Text = preg_replace("/\[observer\=1\].*?\[\/observer\]/ism", '', $Text); $Text = preg_replace("/\[observer\=0\](.*?)\[\/observer\]/ism", '$1', $Text); - $Text = preg_replace("/\[rpost\](.*?)\[\/rpost\]/ism", '', $Text); + $Text = preg_replace("/\[rpost(=.*?)?\](.*?)\[\/rpost\]/ism", '', $Text); } } |