diff options
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcmail_output_html.php | 17 | ||||
-rw-r--r-- | program/include/rcmail_output_json.php | 7 |
2 files changed, 22 insertions, 2 deletions
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index a2ec29ca3..6db559358 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -924,8 +924,21 @@ class rcmail_output_html extends rcmail_output } else if ($object == 'logo') { $attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"'))); - if ($logo = $this->config->get('skin_logo')) - $attrib['src'] = $logo; + + if ($logo = $this->config->get('skin_logo')) { + if (is_array($logo)) { + if ($template_logo = $logo[$this->template_name]) { + $attrib['src'] = $template_logo; + } + elseif ($template_logo = $logo['*']) { + $attrib['src'] = $template_logo; + } + } + else { + $attrib['src'] = $logo; + } + } + $content = html::img($attrib); } else if ($object == 'productname') { diff --git a/program/include/rcmail_output_json.php b/program/include/rcmail_output_json.php index def6ee42c..d0e1eec64 100644 --- a/program/include/rcmail_output_json.php +++ b/program/include/rcmail_output_json.php @@ -227,6 +227,13 @@ class rcmail_output_json extends rcmail_output if (!empty($this->callbacks)) $response['callbacks'] = $this->callbacks; + // trigger generic hook where plugins can put additional content to the response + $hook = $this->app->plugins->exec_hook("render_response", array('response' => $response)); + + // save some memory + $response = $hook['response']; + unset($hook['response']); + echo self::json_serialize($response); } |