Refactor bbcode() into BBCode::convert()

This commit is contained in:
Hypolite Petovan 2018-02-14 21:43:40 -05:00
parent f4e38b6ee9
commit 91fd77af3b
12 changed files with 37 additions and 23 deletions

View file

@ -5,6 +5,8 @@
* Version: 1.1
* Author: Matthew Exon <http://mat.exon.name>
*/
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
@ -180,7 +182,7 @@ function mailstream_sender($item) {
}
function mailstream_decode_subject($subject) {
$html = bbcode($subject);
$html = BBCode::convert($subject);
if (!$html) {
return $subject;
}
@ -285,7 +287,7 @@ function mailstream_send($a, $message_id, $item, $user) {
$mail->IsHTML(true);
$mail->CharSet = 'utf-8';
$template = get_markup_template('mail.tpl', 'addon/mailstream/');
$item['body'] = bbcode($item['body']);
$item['body'] = BBCode::convert($item['body']);
$item['url'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item['id'];
$mail->Body = replace_macros($template, [
'$upstream' => L10n::t('Upstream'),