From a77504aeacd4516156267fe10eeca1bfffcacf87 Mon Sep 17 00:00:00 2001
From: PhilW <roundcube@tehinterweb.co.uk>
Date: Mon, 26 Aug 2013 07:22:34 -0400
Subject: [PATCH] allow different logos for different functions (eg. normal and print)

---
 program/include/rcmail_output_html.php |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index a2ec29c..39f79d1 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -924,8 +924,19 @@
                 }
                 else if ($object == 'logo') {
                     $attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"')));
-                    if ($logo = $this->config->get('skin_logo'))
+
+                    if (is_array($this->config->get('skin_logo'))) {
+                       if (isset($attrib['type']) && array_key_exists($attrib['type'], $this->config->get('skin_logo'))) {
+                           $attrib['src'] = $this->config->get('skin_logo')[$attrib['type']];
+                       }
+                       elseif (array_key_exists('default', $this->config->get('skin_logo'))) {
+                           $attrib['src'] = $this->config->get('skin_logo')['default'];
+                       }
+                    }
+                    elseif ($logo = $this->config->get('skin_logo')) {
                         $attrib['src'] = $logo;
+                    }
+
                     $content = html::img($attrib);
                 }
                 else if ($object == 'productname') {

--
Gitblit v1.9.1