]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Always output a site logo via /api/statusnet/config.:format (so client devs have...
authorZach Copley <zach@status.net>
Tue, 16 Mar 2010 01:41:15 +0000 (18:41 -0700)
committerZach Copley <zach@status.net>
Tue, 16 Mar 2010 01:41:15 +0000 (18:41 -0700)
actions/apistatusnetconfig.php

index bff8313b5c55e993165ee7a798f015ae8e6fb90f..66b23c02d5db082be206395eaa9788e3db0f9220 100644 (file)
@@ -97,8 +97,6 @@ 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) {
@@ -110,6 +108,14 @@ class ApiStatusnetConfigAction extends ApiAction
                     } else if ($value === true) {
                         $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);