From bc92ca56ef6c51393d2782b7654eaa162dfc2e10 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 30 Jul 2012 07:20:56 -0400
Subject: [PATCH] Fixes after default->classic switch
---
program/include/rcube_output_html.php | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index 7ceea18..3bc93db 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -696,10 +696,31 @@
// show a label
case 'label':
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));
- return !$attrib['noshow'] ? (get_boolean((string)$attrib['html']) ? $label : html::quote($label)) : '';
+
+ $label = $this->app->gettext($attrib + array('vars' => $vars));
+ $quoting = !empty($attrib['quoting']) ? strtolower($attrib['quoting']) : (get_boolean((string)$attrib['html']) ? 'no' : '');
+
+ switch ($quoting) {
+ case 'no':
+ case 'raw':
+ break;
+ case 'javascript':
+ case 'js':
+ $label = rcmail::JQ($label);
+ break;
+ default:
+ $label = html::quote($label);
+ break;
+ }
+
+ return $label;
}
break;
--
Gitblit v1.9.1