URL shortening can now be disabled for the 'maxurllength'

Also, URL shortening now consistently uses 'maxurllength'...
This commit is contained in:
Mikael Nordfeldth
2013-10-06 22:35:26 +02:00
parent 34a6624452
commit 87370f0cb1
6 changed files with 12 additions and 12 deletions

View 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;
}