X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=notifyall%2Fnotifyall.php;h=c49128319f3ce102340e7316bbe514efafd315b4;hp=e35d7bf194e558113e94ea6a2f465fe29ebbaf97;hb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f;hpb=7ab24791667ab0ab1a04d01802e0a3ff47110c24 diff --git a/notifyall/notifyall.php b/notifyall/notifyall.php index e35d7bf1..c4912831 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; @@ -49,15 +51,17 @@ 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))); + $htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","
\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 if (intval($_REQUEST['test'])) { $email = $a->config['admin_email']; - $email = "'" . str_replace([" ",","], ["","','"], $email) . "'"; + $email = "'" . str_replace(array(" ",","), array("","','"), $email) . "'"; } $sql_extra = ((intval($_REQUEST['test'])) ? sprintf(" AND `email` in ( %s )", $email) : ''); @@ -77,7 +81,7 @@ function notifyall_post(&$a) { 'messageSubject' => $subject, 'htmlVersion' => $htmlversion, 'textVersion' => $textversion - ]); + )); } notice(L10n::t('Emails sent'));