]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
url shortening fixes for api config and not ur1.ca
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 18 Sep 2013 23:11:47 +0000 (01:11 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 18 Sep 2013 23:11:47 +0000 (01:11 +0200)
Will have to change the 'maxnoticelength' code to stop shortening ALL
links if the setting for infinitely long notices is configured.

actions/apistatusnetconfig.php
lib/default.php

index 7cd7c5ed6cfe7b6a521b1b1292d18d75023a6d88..a58c5d3dfaa67831694789494fd3ac8c9ae1fe96 100644 (file)
@@ -51,7 +51,7 @@ class ApiStatusnetConfigAction extends ApiAction
     var $keys = array(
         'site' => array('name', 'server', 'theme', 'path', 'logo', 'fancy', 'language',
                         'email', 'broughtby', 'broughtbyurl', 'timezone', 'closed',
-                        'inviteonly', 'private', 'textlimit', 'ssl', 'sslserver', 'shorturllength'),
+                        'inviteonly', 'private', 'textlimit', 'ssl', 'sslserver'),
         'license' => array('type', 'owner', 'url', 'title', 'image'),
         'nickname' => array('featured'),
         'profile' => array('biolimit'),
@@ -60,7 +60,8 @@ class ApiStatusnetConfigAction extends ApiAction
         'throttle' => array('enabled', 'count', 'timespan'),
         'xmpp' => array('enabled', 'server', 'port', 'user'),
         'integration' => array('source'),
-        'attachments' => array('uploads', 'file_quota')
+        'attachments' => array('uploads', 'file_quota'),
+        'url' => array('maxlength', 'maxnoticelength'),
     );
 
     /**
index 274c7014a4c397cbbe7a79fadf63b38f0ecf73ec..7aa50bc3d908574722b25ba98355ae6486df4483 100644 (file)
@@ -56,7 +56,6 @@ $default =
               'private' => true,
               'ssl' => 'never',
               'sslserver' => null,
-              'shorturllength' => 30,
               'dupelimit' => 60, // default for same person saying the same thing
               'textlimit' => 0, // in chars; 0 == no limit
               'indent' => true,
@@ -337,8 +336,8 @@ $default =
               'peopletag' => true,
               'external' => 'sometimes'), // Options: 'sometimes', 'never', default = 'sometimes'
         'url' =>
-        array('shortener' => 'ur1.ca',
-              'maxlength' => 25,
+        array('shortener' => 'internal',
+              'maxlength' => 60,
               'maxnoticelength' => -1),
         'http' => // HTTP client settings when contacting other sites
         array('ssl_cafile' => false, // To enable SSL cert validation, point to a CA bundle (eg '/usr/lib/ssl/certs/ca-certificates.crt')