summaryrefslogtreecommitdiff
path: root/lib/Shorturl_api.php
diff options
context:
space:
mode:
authorEvan Prodromou <git@evanprodromou.name>2009-01-23 08:58:31 +0100
committerEvan Prodromou <git@evanprodromou.name>2009-01-23 08:58:31 +0100
commita7c85bebd5be9ea019a8c80d74730d7eb28d4651 (patch)
treec3fdf9575a342624bc71aad1d439ae73594f558c /lib/Shorturl_api.php
parent4873277b58941ae6ec16543f437f4267ccab5ac0 (diff)
parent7aa496cd8a939960eeaf79f3397f6fe94097e047 (diff)
Merge branch 'master' of /var/www/mublog
Conflicts: actions/api.php actions/deletenotice.php actions/recoverpassword.php actions/remotesubscribe.php actions/tag.php actions/tagrss.php actions/twitapiaccount.php actions/twitapiusers.php classes/Notice.php classes/User.php lib/common.php lib/language.php lib/subs.php lib/twitterapi.php lib/util.php scripts/inbox_users.php scripts/update_translations.php Merged development trunk into laconica head. woohoo!
Diffstat (limited to 'lib/Shorturl_api.php')
-rw-r--r--lib/Shorturl_api.php27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/Shorturl_api.php b/lib/Shorturl_api.php
index 7beae0ec6..fe106cb83 100644
--- a/lib/Shorturl_api.php
+++ b/lib/Shorturl_api.php
@@ -19,14 +19,17 @@
if (!defined('LACONICA')) { exit(1); }
-class ShortUrlApi {
+class ShortUrlApi
+{
protected $service_url;
- function __construct($service_url) {
+ function __construct($service_url)
+ {
$this->service_url = $service_url;
}
- function shorten($url) {
+ function shorten($url)
+ {
if ($this->is_long($url)) return $this->shorten_imp($url);
return $url;
}
@@ -67,8 +70,10 @@ class ShortUrlApi {
}
}
-class LilUrl extends ShortUrlApi {
- function __construct() {
+class LilUrl extends ShortUrlApi
+{
+ function __construct()
+ {
parent::__construct('http://ur1.ca/');
}
@@ -85,8 +90,10 @@ class LilUrl extends ShortUrlApi {
}
-class PtitUrl extends ShortUrlApi {
- function __construct() {
+class PtitUrl extends ShortUrlApi
+{
+ function __construct()
+ {
parent::__construct('http://ptiturl.com/?creer=oui&action=Reduire&url=');
}
@@ -102,8 +109,10 @@ class PtitUrl extends ShortUrlApi {
}
}
-class TightUrl extends ShortUrlApi {
- function __construct() {
+class TightUrl extends ShortUrlApi
+{
+ function __construct()
+ {
parent::__construct('http://2tu.us/?save=y&url=');
}