diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-07-29 17:23:09 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-07-29 17:23:09 +0200 |
commit | ac6945eed1644e7a9e58c5f74dae696ff0f09d72 (patch) | |
tree | b3b13f5569869a2feffb3990ea8e33313f789e5e /include/api.php | |
parent | b1e766dadb1d4a9e727b2d1d5f32442392ac6bd3 (diff) | |
parent | f47d582736ddf24528dd514850d4bed76783f589 (diff) | |
download | volse-hubzilla-ac6945eed1644e7a9e58c5f74dae696ff0f09d72.tar.gz volse-hubzilla-ac6945eed1644e7a9e58c5f74dae696ff0f09d72.tar.bz2 volse-hubzilla-ac6945eed1644e7a9e58c5f74dae696ff0f09d72.zip |
Merge remote-tracking branch 'friendika/master'
Diffstat (limited to 'include/api.php')
-rw-r--r-- | include/api.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/api.php b/include/api.php index 5ebf04bb9..bc981646d 100644 --- a/include/api.php +++ b/include/api.php @@ -561,3 +561,30 @@ } api_register_func('api/account/rate_limit_status','api_account_rate_limit_status',true); + + + function api_statusnet_config(&$a,$type) { + $name = $a->config['sitename']; + $server = $a->get_hostname(); + $logo = $a->get_baseurl() . '/images/friendika-64.png'; + $email = $a->config['admin_email']; + $closed = (($a->config['register_policy'] == REGISTER_CLOSED) ? 'true' : 'false'); + $private = (($a->config['system']['block_public']) ? 'true' : 'false'); + $textlimit = (($a->config['max_import_size']) ? $a->config['max_import_size'] : '200000'); + $ssl = (($a->config['system']['have_ssl']) ? 'true' : 'false'); + $sslserver = (($ssl === 'true') ? str_replace('http:','https:',$a->get_baseurl()) : ''); + + $config = array( + 'site' => array('name' => $name,'server' => $server, 'theme' => 'default', 'path' => '', + 'logo' => $logo, 'fancy' => 'true', 'language' => 'en', 'email' => $email, 'broughtby' => '', + 'broughtbyurl' => '', 'timezone' => 'UTC', 'closed' => $closed, 'inviteonly' => 'false', + 'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl, + 'shorturllength' => '30' + ), + ); + + return api_apply_template('config', $type, array('$config' => $config)); + + } + api_register_func('api/statusnet/config','api_statusnet_config',true); + |