We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit a9f83008 authored by Evan Prodromou's avatar Evan Prodromou

Merge branch '1.0.x' into testing

parents b816d24d 540c5453
......@@ -2163,7 +2163,11 @@ function common_shorten_url($long_url, User $user=null, $force = false)
} else {
$shortenedUrl = common_local_url('redirecturl',
array('id' => $f->id));
return $shortenedUrl;
if ((mb_strlen($shortenedUrl) < mb_strlen($long_url)) || $force) {
return $shortenedUrl;
} else {
return $long_url;
}
}
} else {
return $long_url;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment