From: Craig Andrews Date: Wed, 21 Apr 2010 21:14:25 +0000 (-0400) Subject: add 'always' parameter to common_shorten_links X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c78a10b476bb6d84e4056038fea1b8185d20ef46;p=quix0rs-gnu-social.git add 'always' parameter to common_shorten_links --- diff --git a/lib/util.php b/lib/util.php index 81920eb447..e0669a1d56 100644 --- a/lib/util.php +++ b/lib/util.php @@ -855,10 +855,10 @@ function common_linkify($url) { return XMLStringer::estring('a', $attrs, $url); } -function common_shorten_links($text) +function common_shorten_links($text, $always = false) { $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')); }