X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=notifyall%2Fnotifyall.php;h=5ea0db38c614749007d33a81d8254a16713d6642;hb=dcad148a1ac7193bde487832582bbe416c24b56e;hp=9abde28111a70a48f90f7aad9345f69cdaf0a18f;hpb=f8c162cbfb777793891f885e019eb8eae319dce1;p=friendica-addons.git diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index 9abde281..5ea0db38 100644 --- a/notifyall/notifyall.php +++ b/notifyall/notifyall.php @@ -7,6 +7,8 @@ * Author: Mike Macgirvin (Inital Author of the hubbwall Addon for the Hubzilla Project) * Author: Rabuzarus (Port to Friendica) */ + +use Friendica\Content\Text\BBCode; use Friendica\Core\L10n; use Friendica\Util\Emailer; @@ -37,9 +39,9 @@ function notifyall_post(&$a) { $sitename = $a->config['sitename']; if (!x($a->config['admin_name'])) - $sender_name = sprintf(L10n::t('%s Administrator'), $sitename); + $sender_name = L10n::t('%s Administrator', $sitename); else - $sender_name = sprintf(L10n::t('%1$s, %2$s Administrator'), $a->config['admin_name'], $sitename); + $sender_name = L10n::t('%1$s, %2$s Administrator', $a->config['admin_name'], $sitename); if (! x($a->config['sender_email'])) $sender_email = 'noreply@' . $a->get_hostname(); @@ -49,9 +51,9 @@ function notifyall_post(&$a) { $subject = $_REQUEST['subject']; - $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(["\\r", "\\n"],[ "", "\n"], $text))),ENT_QUOTES,'UTF-8')); + $textversion = strip_tags(html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "\n"], $text))), ENT_QUOTES, 'UTF-8')); - $htmlversion = bbcode(stripslashes(str_replace(["\\r","\\n"], ["","
\n"],$text))); + $htmlversion = BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "
\n"], $text))); // if this is a test, send it only to the admin(s) // admin_email might be a comma separated list, but we need "a@b','c@d','e@f