]> git.mxchange.org Git - friendica.git/blobdiff - mod/notify.php
Adjusted implementation to a better one (thanks to Michael Vogel)
[friendica.git] / mod / notify.php
index dff7d147f0e10dfb788c7c05c98bc04bb8030ba4..458d0140a64130f28e2f383d392692b75da64f2e 100644 (file)
@@ -4,10 +4,11 @@
  */
 
 use Friendica\App;
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\L10n;
 use Friendica\Core\NotificationsManager;
 use Friendica\Core\System;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
 use Friendica\Model\Item;
 use Friendica\Module\Login;
 use Friendica\Util\Temporal;
@@ -61,15 +62,14 @@ function notify_content(App $a)
        $notif_tpl = get_markup_template('notifications.tpl');
 
        $not_tpl = get_markup_template('notify.tpl');
-       require_once('include/bbcode.php');
 
        $r = $nm->getAll(['seen'=>0]);
-       if (DBM::is_result($r) > 0) {
+       if (DBA::isResult($r) > 0) {
                foreach ($r as $it) {
                        $notif_content .= replace_macros($not_tpl, [
                                '$item_link' => System::baseUrl(true).'/notify/view/'. $it['id'],
                                '$item_image' => $it['photo'],
-                               '$item_text' => strip_tags(bbcode($it['msg'])),
+                               '$item_text' => strip_tags(BBCode::convert($it['msg'])),
                                '$item_when' => Temporal::getRelativeDate($it['date'])
                        ]);
                }