From: Craig Andrews Date: Thu, 10 Sep 2009 16:13:43 +0000 (-0400) Subject: Revert "If a shortened URL begins with http://, don't include it in the shortened... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=584ea1b23c540cdd781f52eeecd6ad893f63c1a8;p=quix0rs-gnu-social.git Revert "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 reverts commit e2848eb8621dd645fa68cb1641c0af1df5530408. Downstream consumers of our notices (such as Friendfeed, Facebook, etc) don't have sophisticated URL detection, so a notice that reads: "check out ur1.ca/1" won't be linked. So the http:// prefix is mandatory. --- diff --git a/lib/util.php b/lib/util.php index 3e95d2bea3..256acf1993 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1414,9 +1414,6 @@ 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; }