forked from GNUsocial/gnu-social
add 'always' parameter to common_shorten_links
This commit is contained in:
parent
61e7d898dc
commit
c78a10b476
@ -855,10 +855,10 @@ function common_linkify($url) {
|
|||||||
return XMLStringer::estring('a', $attrs, $url);
|
return XMLStringer::estring('a', $attrs, $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
function common_shorten_links($text)
|
function common_shorten_links($text, $always = false)
|
||||||
{
|
{
|
||||||
$maxLength = Notice::maxContent();
|
$maxLength = Notice::maxContent();
|
||||||
if ($maxLength == 0 || mb_strlen($text) <= $maxLength) return $text;
|
if (!$always && ($maxLength == 0 || mb_strlen($text) <= $maxLength)) return $text;
|
||||||
return common_replace_urls_callback($text, array('File_redirection', 'makeShort'));
|
return common_replace_urls_callback($text, array('File_redirection', 'makeShort'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user