Merge pull request #8455 from annando/issue-8254-2

Issue 8254 More length shortenings
This commit is contained in:
Hypolite Petovan 2020-03-26 08:29:26 -04:00 committed by GitHub
commit b139e3477a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View 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 ?? '',

View 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'] ?? '');

View 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()
],