mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Refactor bbcode() into BBCode::convert()
This commit is contained in:
parent
f4e38b6ee9
commit
91fd77af3b
12 changed files with 37 additions and 23 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue