]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8254 More length shortenings
authorMichael <heluecht@pirati.ca>
Wed, 25 Mar 2020 23:18:07 +0000 (23:18 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 25 Mar 2020 23:18:07 +0000 (23:18 +0000)
include/enotify.php
src/Model/Item.php
src/Util/ParseUrl.php

index 10421fb75914110d9c06067c8b6c144e8fddc5b0..2ae7a99157a2c72f43111020f9369f8bb22536ad 100644 (file)
@@ -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 ?? '',
index 08007fb4bdacd8a0e7a8ffd6b47acde897896fbf..0cf9368b5930ef7ff3c5b1c52ff3a9206e85e526 100644 (file)
@@ -1558,7 +1558,7 @@ class Item
                $item['object']        = trim($item['object'] ?? '');
                $item['target-type']   = trim($item['target-type'] ?? '');
                $item['target']        = trim($item['target'] ?? '');
-               $item['plink']         = trim($item['plink'] ?? '');
+               $item['plink']         = substr(trim($item['plink'] ?? ''), 0, 255);
                $item['allow_cid']     = trim($item['allow_cid'] ?? '');
                $item['allow_gid']     = trim($item['allow_gid'] ?? '');
                $item['deny_cid']      = trim($item['deny_cid'] ?? '');
index 06e320c40e03f29a93ce987d4f9a217deb13486f..62b5d007d8b62c0238715f7e82f4ccc3f7984939 100644 (file)
@@ -87,7 +87,7 @@ class ParseUrl
                DBA::insert(
                        'parsed_url',
                        [
-                               'url' => Strings::normaliseLink($url), 'guessing' => !$no_guessing,
+                               'url' => substr(Strings::normaliseLink($url), 0, 255), 'guessing' => !$no_guessing,
                                'oembed' => $do_oembed, 'content' => serialize($data),
                                'created' => DateTimeFormat::utcNow()
                        ],