From: Evan Prodromou Date: Fri, 21 Aug 2009 12:16:08 +0000 (-0400) Subject: url-shortening check correctly checks max notice length X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=35bf388204ab978e09a036aaa4e301b208f0a4ed;p=quix0rs-gnu-social.git url-shortening check correctly checks max notice length --- 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')); }