summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-09 22:57:15 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-09 22:57:15 -0400
commite2848eb8621dd645fa68cb1641c0af1df5530408 (patch)
tree7ec62fe718654a78ce9d28d823f6b59b2a31739c
parentaecdba1ded89b45f32d0b7615ce6b103478403dd (diff)
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.
-rw-r--r--lib/util.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 256acf199..3e95d2bea 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1414,6 +1414,9 @@ function common_shorten_url($long_url)
curl_close($curlh);
+ if(substr($short_url,0,7)=='http://'){
+ $short_url = substr($short_url,7);
+ }
return $short_url;
}