summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilW <roundcube@tehinterweb.co.uk>2013-08-26 13:45:30 +0100
committerPhilW <roundcube@tehinterweb.co.uk>2013-08-26 13:45:30 +0100
commitd81d69377a53f347eab1bef898dc405d3b5940e9 (patch)
treed0491d55f6033f9ba57940edfbce26f824439dad
parenta77504aeacd4516156267fe10eeca1bfffcacf87 (diff)
use template file name rather than special attribute
-rw-r--r--config/defaults.inc.php5
-rw-r--r--program/include/rcmail_output_html.php8
-rw-r--r--skins/classic/includes/header.html2
-rw-r--r--skins/classic/templates/login.html2
-rw-r--r--skins/classic/templates/messageprint.html2
-rw-r--r--skins/larry/includes/header.html2
-rw-r--r--skins/larry/templates/login.html2
-rw-r--r--skins/larry/templates/messageprint.html2
8 files changed, 12 insertions, 13 deletions
diff --git a/config/defaults.inc.php b/config/defaults.inc.php
index feed82f1b..30ed70bd2 100644
--- a/config/defaults.inc.php
+++ b/config/defaults.inc.php
@@ -240,9 +240,8 @@ $config['support_url'] = '';
// replace Roundcube logo with this image
// specify an URL relative to the document root of this Roundcube installation
-// an array can be used to specify different logos for different screens
-// for example array("default" => "/images/roundcube_logo.png", "print" => "/images/roundcube_logo_print.png")
-// available options: default, login, print
+// an array can be used to specify different logos for specific template files, '*' for default logo
+// for example array("*" => "/images/roundcube_logo.png", "messageprint" => "/images/roundcube_logo_print.png")
$config['skin_logo'] = null;
// automatically create a new Roundcube user when log-in the first time.
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index 39f79d119..ebf71cb3f 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -926,11 +926,11 @@ class rcmail_output_html extends rcmail_output
$attrib += array('alt' => $this->xml_command(array('', 'object', 'name="productname"')));
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']];
+ if ($logo = $this->config->get('skin_logo')[$this->template_name]) {
+ $attrib['src'] = $logo;
}
- 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;
}
}
elseif ($logo = $this->config->get('skin_logo')) {
diff --git a/skins/classic/includes/header.html b/skins/classic/includes/header.html
index 962e4dd7b..08d777af0 100644
--- a/skins/classic/includes/header.html
+++ b/skins/classic/includes/header.html
@@ -1,2 +1,2 @@
-<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" type="default" />
+<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" onclick="location.href='./?_page=1'" />
<roundcube:object name="message" id="message" />
diff --git a/skins/classic/templates/login.html b/skins/classic/templates/login.html
index ece8f0477..2dacd48ff 100644
--- a/skins/classic/templates/login.html
+++ b/skins/classic/templates/login.html
@@ -7,7 +7,7 @@
</head>
<body>
-<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" style="margin:0 11px" type="login" />
+<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" style="margin:0 11px" />
<roundcube:object name="message" id="message" />
diff --git a/skins/classic/templates/messageprint.html b/skins/classic/templates/messageprint.html
index 97049d281..fa7822ad5 100644
--- a/skins/classic/templates/messageprint.html
+++ b/skins/classic/templates/messageprint.html
@@ -7,7 +7,7 @@
</head>
<body>
-<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" type="print" />
+<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" border="0" />
<div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" />
diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html
index 35ce837f6..5a934d89b 100644
--- a/skins/larry/includes/header.html
+++ b/skins/larry/includes/header.html
@@ -29,7 +29,7 @@
<roundcube:button command="logout" label="logout" class="button-logout" classSel="button-logout" innerClass="button-inner" />
<span class="minmodetoggle"></span>
</div>
- <roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" type="default" />
+ <roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" />
</div>
<roundcube:endif />
diff --git a/skins/larry/templates/login.html b/skins/larry/templates/login.html
index 45769e3ff..13e919ad3 100644
--- a/skins/larry/templates/login.html
+++ b/skins/larry/templates/login.html
@@ -9,7 +9,7 @@
<div id="login-form">
<div class="box-inner">
-<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" type="login" />
+<roundcube:object name="logo" src="/images/roundcube_logo.png" id="logo" />
<roundcube:form name="form" method="post">
<roundcube:object name="loginform" form="form" size="40" />
diff --git a/skins/larry/templates/messageprint.html b/skins/larry/templates/messageprint.html
index 297ffd6e2..d01c70bcd 100644
--- a/skins/larry/templates/messageprint.html
+++ b/skins/larry/templates/messageprint.html
@@ -7,7 +7,7 @@
</head>
<body>
-<div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" type="print" /></div>
+<div id="header"><roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" /></div>
<div id="printmessageframe">
<roundcube:object name="messageHeaders" class="headers-table" />