From 73b14686fc7f2ac028af4e8366e7d3882d2894a8 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Thu, 30 Oct 2014 07:51:53 -0400 Subject: [PATCH] Fix possible issues in skin/skin_path config handling (#1490125) --- program/include/rcmail_output_html.php | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index d4f9185..7a0992f 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -168,6 +168,8 @@ $valid = !$skin; } + $skin_path = rtrim($skin_path, '/'); + $this->config->set('skin_path', $skin_path); $this->base_path = $skin_path; @@ -870,17 +872,17 @@ $attrib['name'] = $this->eval_expression($attrib['expression']); if ($attrib['name'] || $attrib['command']) { - // @FIXME: 'noshow' is useless, remove? - if ($attrib['noshow']) { - return ''; - } - $vars = $attrib + array('product' => $this->config->get('product_name')); unset($vars['name'], $vars['command']); $label = $this->app->gettext($attrib + array('vars' => $vars)); $quoting = !empty($attrib['quoting']) ? strtolower($attrib['quoting']) : (rcube_utils::get_boolean((string)$attrib['html']) ? 'no' : ''); + // 'noshow' can be used in skins to define new labels + if ($attrib['noshow']) { + return ''; + } + switch ($quoting) { case 'no': case 'raw': -- Gitblit v1.9.1