From 35bf388204ab978e09a036aaa4e301b208f0a4ed Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 21 Aug 2009 08:16:08 -0400 Subject: [PATCH] url-shortening check correctly checks max notice length --- lib/util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index d1f3bed9e1..0402e24013 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')); } -- 2.39.5