CS improvements

pull/14/head
Aleksander Machniak 13 years ago
parent 2df262d448
commit 0d80fad9e0

@ -696,18 +696,31 @@ class rcube_output_html extends rcube_output
// show a label // show a label
case 'label': case 'label':
if ($attrib['name'] || $attrib['command']) { if ($attrib['name'] || $attrib['command']) {
// @FIXME: 'noshow' is useless, remove?
if ($attrib['noshow']) {
return '';
}
$vars = $attrib + array('product' => $this->config->get('product_name')); $vars = $attrib + array('product' => $this->config->get('product_name'));
unset($vars['name'], $vars['command']); unset($vars['name'], $vars['command']);
$label = $this->app->gettext($attrib + array('vars' => $vars)); $label = $this->app->gettext($attrib + array('vars' => $vars));
$quoting = !empty($attrib['quoting']) ? strtolower($attrib['quoting']) : (get_boolean((string)$attrib['html']) ? 'no' : ''); $quoting = !empty($attrib['quoting']) ? strtolower($attrib['quoting']) : (get_boolean((string)$attrib['html']) ? 'no' : '');
switch ($quoting) { switch ($quoting) {
case 'no': case 'no':
case 'raw': break; case 'raw':
break;
case 'javascript': case 'javascript':
case 'js': $label = rcmail::JQ($label); break; case 'js':
default: $label = html::quote($label); break; $label = rcmail::JQ($label);
break;
default:
$label = html::quote($label);
break;
} }
return !$attrib['noshow'] ? $label : '';
return $label;
} }
break; break;

Loading…
Cancel
Save