If a shortened URL begins with http://, don't include it in the shortened url. Saves 7 characters, which is pretty awesome for 140 character max length notices.
This commit is contained in:
parent
aecdba1ded
commit
e2848eb862
@ -1414,6 +1414,9 @@ function common_shorten_url($long_url)
|
|||||||
|
|
||||||
curl_close($curlh);
|
curl_close($curlh);
|
||||||
|
|
||||||
|
if(substr($short_url,0,7)=='http://'){
|
||||||
|
$short_url = substr($short_url,7);
|
||||||
|
}
|
||||||
return $short_url;
|
return $short_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user