]> git.mxchange.org Git - friendica.git/blobdiff - include/enotify.php
Merge pull request #8579 from MrPetovan/bug/fatal-errors
[friendica.git] / include / enotify.php
index 4a18eea8273593a2a7762b35e0c0eccbbe713a61..78a390e657511a041136d90dfe60671918ee779d 100644 (file)
@@ -176,7 +176,7 @@ function notification($params)
                if ($params['activity']['origin_comment']) {
                        $message = $l10n->t('%1$s replied to you on %2$s\'s %3$s %4$s');
                } elseif ($params['activity']['explicit_tagged']) {
-                       $message = $l10n->t('$l10n->t(%1$s tagged you on %2$s\'s %3$s %4$s');
+                       $message = $l10n->t('%1$s tagged you on %2$s\'s %3$s %4$s');
                } else {
                        $message = $l10n->t('%1$s commented on %2$s\'s %3$s %4$s');
                }
@@ -453,7 +453,7 @@ function notification($params)
        if ($show_in_notification_page) {
                $notification = DI::notify()->insert([
                        'name'       => $params['source_name'] ?? '',
-                       'name_cache' => strip_tags(BBCode::convert($params['source_name'] ?? '')),
+                       'name_cache' => substr(strip_tags(BBCode::convert($params['source_name'] ?? '')), 0, 255),
                        'url'        => $params['source_link'] ?? '',
                        'photo'      => $params['source_photo'] ?? '',
                        'link'       => $itemlink ?? '',
@@ -574,7 +574,7 @@ function check_user_notification($itemid) {
  * @throws \Friendica\Network\HTTPException\InternalServerErrorException
  */
 function check_item_notification($itemid, $uid, $notification_type) {
-       $fields = ['id', 'mention', 'tag', 'parent', 'title', 'body',
+       $fields = ['id', 'mention', 'parent', 'title', 'body',
                'author-link', 'author-name', 'author-avatar', 'author-id',
                'guid', 'parent-uri', 'uri', 'contact-id', 'network'];
        $condition = ['id' => $itemid, 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT], 'deleted' => false];