From d1abd8e339a1346b02ebbca5365cd824adf5f897 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 12 Oct 2013 06:28:40 -0400
Subject: [PATCH] Fix infinite loop in rcube_utils::mod_css_styles() after recent changes in rcube_string_replacer
---
program/include/rcmail_output_html.php | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index 39f79d1..7cab372 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -925,16 +925,18 @@
else if ($object == 'logo') {
$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']];
- }
- 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;
+ 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);
@@ -1053,7 +1055,7 @@
// these commands can be called directly via url
$a_static_commands = array('compose', 'list', 'preferences', 'folders', 'identities');
- if (!($attrib['command'] || $attrib['name'])) {
+ if (!($attrib['command'] || $attrib['name'] || $attrib['href'])) {
return '';
}
--
Gitblit v1.9.1