X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusnetconfig.php;h=76d37ea97f83a919de56d639cd937d05ad3c6483;hb=3593f3f1323bfce289bc9805629f7d126dac7ae6;hp=0345a9bc0781e7cb986d8ac9207cb1eda53672d4;hpb=122c8677b7004bae4cfe7e2bd49fc1bc3187c72c;p=quix0rs-gnu-social.git diff --git a/actions/apistatusnetconfig.php b/actions/apistatusnetconfig.php index 0345a9bc07..76d37ea97f 100644 --- a/actions/apistatusnetconfig.php +++ b/actions/apistatusnetconfig.php @@ -32,8 +32,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; - /** * Gives a full dump of configuration variables for this instance * of StatusNet, minus variables that may be security-sensitive (like @@ -99,19 +97,25 @@ class ApiStatusnetConfigAction extends ApiAction // XXX: check that all sections and settings are legal XML elements - common_debug(var_export($this->keys, true)); - foreach ($this->keys as $section => $settings) { $this->elementStart($section); foreach ($settings as $setting) { $value = common_config($section, $setting); if (is_array($value)) { $value = implode(',', $value); - } else if ($value === false) { + } else if ($value === false || $value == '0') { $value = 'false'; - } else if ($value === true) { + } else if ($value === true || $value == '1') { $value = 'true'; } + + // return theme logo if there's no site specific one + if (empty($value)) { + if ($section == 'site' && $setting == 'logo') { + $value = Theme::path('logo.png'); + } + } + $this->element($setting, null, $value); } $this->elementEnd($section);