From: Michael Date: Wed, 25 Mar 2020 23:18:07 +0000 (+0000) Subject: Issue 8254 More length shortenings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6f22e3909be052fee65d4ac93a5278a41e201de9;p=friendica.git Issue 8254 More length shortenings --- diff --git a/include/enotify.php b/include/enotify.php index 10421fb759..2ae7a99157 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -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 ?? '', diff --git a/src/Model/Item.php b/src/Model/Item.php index 08007fb4bd..0cf9368b59 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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'] ?? ''); diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index 06e320c40e..62b5d007d8 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -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() ],