summaryrefslogtreecommitdiff
path: root/lib/Shorturl_api.php
diff options
context:
space:
mode:
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=');
}