Merge branch 'jeff' into 0.7.x
* jeff: Add site-wide option to change the length at which URLs are auto-shortened
This commit is contained in:
commit
e36a0fd619
3
README
3
README
@ -901,6 +901,9 @@ sslserver: use an alternate server name for SSL URLs, like
|
|||||||
parameters correctly so that both the SSL server and the
|
parameters correctly so that both the SSL server and the
|
||||||
"normal" server can access the session cookie and
|
"normal" server can access the session cookie and
|
||||||
preferably other cookies as well.
|
preferably other cookies as well.
|
||||||
|
shorturllength: Length of URL at which URLs in a message exceeding 140
|
||||||
|
characters will be sent to the user's chosen
|
||||||
|
shortening service.
|
||||||
|
|
||||||
db
|
db
|
||||||
--
|
--
|
||||||
|
@ -39,7 +39,7 @@ class ShortUrlApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function is_long($url) {
|
private function is_long($url) {
|
||||||
return strlen($url) >= 30;
|
return strlen($url) >= common_config('site', 'shorturllength');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function http_post($data) {
|
protected function http_post($data) {
|
||||||
|
@ -89,6 +89,7 @@ $config =
|
|||||||
'private' => false,
|
'private' => false,
|
||||||
'ssl' => 'never',
|
'ssl' => 'never',
|
||||||
'sslserver' => null,
|
'sslserver' => null,
|
||||||
|
'shorturllength' => 30,
|
||||||
'dupelimit' => 60), # default for same person saying the same thing
|
'dupelimit' => 60), # default for same person saying the same thing
|
||||||
'syslog' =>
|
'syslog' =>
|
||||||
array('appname' => 'laconica', # for syslog
|
array('appname' => 'laconica', # for syslog
|
||||||
|
Loading…
Reference in New Issue
Block a user