X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusnetconfig.php;h=76d37ea97f83a919de56d639cd937d05ad3c6483;hb=0b6cc7c33d5239bbc9f01c00d3fb8c00a3d6e4c7;hp=bff8313b5c55e993165ee7a798f015ae8e6fb90f;hpb=1b1dab206fa1ff99ae40867cda6fa48857f5c1c0;p=quix0rs-gnu-social.git diff --git a/actions/apistatusnetconfig.php b/actions/apistatusnetconfig.php index bff8313b5c..76d37ea97f 100644 --- a/actions/apistatusnetconfig.php +++ b/actions/apistatusnetconfig.php @@ -97,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);