]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
url-shortening check correctly checks max notice length
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 12:16:08 +0000 (08:16 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 12:16:08 +0000 (08:16 -0400)
lib/util.php

index d1f3bed9e124ddf7a6a4f2caaedc2b40117a4bed..0402e240130631e0259a814ca793f7892a868859 100644 (file)
@@ -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'));
 }