X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=1e2008392d3438494ee0c20d1850f116ef8dd7b9;hb=4d8d5ca6a58af9aa98cd7f6ca38da5176c621f0d;hp=2b8c36e257d9c58929337feb927f3dd7c1093ae1;hpb=9b37f5c0855c8071075fa3ce49b7e9c38f2c6a2e;p=friendica.git
diff --git a/include/enotify.php b/include/enotify.php
index 2b8c36e257..1e2008392d 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -3,6 +3,7 @@
* @file include/enotify.php
*/
+use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
@@ -11,9 +12,6 @@ use Friendica\Database\DBM;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Emailer;
-require_once 'include/bbcode.php';
-require_once 'include/html2bbcode.php';
-
/**
* @brief Creates a notification entry and possibly sends a mail
*
@@ -448,7 +446,7 @@ function notification($params)
$datarray = [];
$datarray['hash'] = $hash;
$datarray['name'] = $params['source_name'];
- $datarray['name_cache'] = strip_tags(bbcode($params['source_name']));
+ $datarray['name_cache'] = strip_tags(BBCode::convert($params['source_name']));
$datarray['url'] = $params['source_link'];
$datarray['photo'] = $params['source_photo'];
$datarray['date'] = DateTimeFormat::utcNow();
@@ -519,7 +517,7 @@ function notification($params)
$itemlink = System::baseUrl().'/notify/view/'.$notify_id;
$msg = replace_macros($epreamble, ['$itemlink' => $itemlink]);
- $msg_cache = format_notification_message($datarray['name_cache'], strip_tags(bbcode($msg)));
+ $msg_cache = format_notification_message($datarray['name_cache'], strip_tags(BBCode::convert($msg)));
q("UPDATE `notify` SET `msg` = '%s', `msg_cache` = '%s' WHERE `id` = %d AND `uid` = %d",
dbesc($msg),
dbesc($msg_cache),
@@ -567,9 +565,9 @@ function notification($params)
}
// textversion keeps linebreaks
- $textversion = strip_tags(str_replace("
", "\n", html_entity_decode(bbcode(stripslashes(str_replace(["\\r\\n", "\\r", "\\n"], "\n",
+ $textversion = strip_tags(str_replace("
", "\n", html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r\\n", "\\r", "\\n"], "\n",
$body))),ENT_QUOTES, 'UTF-8')));
- $htmlversion = html_entity_decode(bbcode(stripslashes(str_replace(["\\r\\n", "\\r", "\\n\\n", "\\n"],
+ $htmlversion = html_entity_decode(BBCode::convert(stripslashes(str_replace(["\\r\\n", "\\r", "\\n\\n", "\\n"],
"
\n", $body))), ENT_QUOTES, 'UTF-8');
$datarray = [];