]> git.mxchange.org Git - friendica-addons.git/blobdiff - notifyall/notifyall.php
Merge branch '3.6-rc'
[friendica-addons.git] / notifyall / notifyall.php
index e35d7bf194e558113e94ea6a2f465fe29ebbaf97..c49128319f3ce102340e7316bbe514efafd315b4 100644 (file)
@@ -7,6 +7,8 @@
  * Author: Mike Macgirvin (Inital Author of the hubbwall Addon for the Hubzilla Project)
  * Author: Rabuzarus <https://friendica.kommune4.de/profile/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"], ["","<br />\n"],$text)));
+       $htmlversion = BBCode::convert(stripslashes(str_replace(["\\r", "\\n"], ["", "<br />\n"], $text)));
 
+       $htmlversion = bbcode(stripslashes(str_replace(array("\\r","\\n"), array("","<br />\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'));