]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
URL shortening can now be disabled for the 'maxurllength'
[quix0rs-gnu-social.git] / lib / util.php
index c9500d72227504da93c818fa41d79186009eed8d..fdd678abdb1406c859acba5092faf1933274deac 100644 (file)
@@ -2155,7 +2155,7 @@ function common_shorten_url($long_url, User $user=null, $force = false)
     // $force forces shortening even if it's not strictly needed
     // I doubt URL shortening is ever 'strictly' needed. - ESP
 
-    if (mb_strlen($long_url) < $maxUrlLength && !$force) {
+    if (($maxUrlLength == -1 || mb_strlen($long_url) < $maxUrlLength) && !$force) {
         return $long_url;
     }