summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 08:16:08 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 08:16:08 -0400
commit35bf388204ab978e09a036aaa4e301b208f0a4ed (patch)
treee9fc58b82358cc610bda7381950435af6696ec04 /lib
parent3565383f777095c0367cc197e5e4b9486784592b (diff)
url-shortening check correctly checks max notice length
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index d1f3bed9e..0402e2401 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -570,7 +570,8 @@ function common_linkify($url) {
function common_shorten_links($text)
{
- if (mb_strlen($text) <= 140) return $text;
+ $maxLength = Notice::maxContent();
+ if ($maxLength == 0 || mb_strlen($text) <= $maxLength) return $text;
return common_replace_urls_callback($text, array('File_redirection', 'makeShort'));
}