summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff Mitchell <mitchell@kde.org>2009-06-11 13:07:41 +0000
committerZach Copley <zach@controlyourself.ca>2009-06-30 16:46:33 -0700
commitb416df93128e6ffc42ad62233f92ab617f809de1 (patch)
tree015e33c876c76123623f5cc9a098fa9f71306ec5 /lib
parentccbc5c447df5a5284b8845d9a53f28d17d8df875 (diff)
Add site-wide option to change the length at which URLs are auto-shortened
Diffstat (limited to 'lib')
-rw-r--r--lib/Shorturl_api.php2
-rw-r--r--lib/common.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Shorturl_api.php b/lib/Shorturl_api.php
index 29f4eb3a6..22d5b4cb5 100644
--- a/lib/Shorturl_api.php
+++ b/lib/Shorturl_api.php
@@ -40,7 +40,7 @@ class ShortUrlApi
}
private function is_long($url) {
- return strlen($url) >= $this->long_limit;
+ return strlen($url) >= common_config('site', 'shorturllength');
}
protected function http_post($data) {
diff --git a/lib/common.php b/lib/common.php
index e10f24b3b..5d451463b 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -120,6 +120,7 @@ $config =
'private' => false,
'ssl' => 'never',
'sslserver' => null,
+ 'shorturllength' => 30,
'dupelimit' => 60), # default for same person saying the same thing
'syslog' =>
array('appname' => 'laconica', # for syslog