diff options
author | Craig Andrews <candrews@integralblue.com> | 2010-04-21 17:14:25 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2010-04-21 17:14:25 -0400 |
commit | c78a10b476bb6d84e4056038fea1b8185d20ef46 (patch) | |
tree | 177ea7b0a44f753d92f4208bcd9b92afc76a805a | |
parent | 61e7d898dc24b06afbda963ee78a907a3863e82d (diff) |
add 'always' parameter to common_shorten_links
-rw-r--r-- | lib/util.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index 81920eb44..e0669a1d5 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')); } |