summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-07-24 14:56:12 +0200
committerAleksander Machniak <alec@alec.pl>2012-07-24 14:56:12 +0200
commit0d80fad9e09c88cb605587e4453d560f6ae5b661 (patch)
treef7da168e75388c38b0bbd848f0520049b58c6e58 /program/include
parent2df262d448831cc6ca3a5137b80e92afc0bb22f5 (diff)
CS improvements
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_output_html.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php
index 30201fd04..3bc93db53 100644
--- a/program/include/rcube_output_html.php
+++ b/program/include/rcube_output_html.php
@@ -696,18 +696,31 @@ class rcube_output_html extends rcube_output
// 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));
+
+ $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 'raw':
+ break;
case 'javascript':
- case 'js': $label = rcmail::JQ($label); break;
- default: $label = html::quote($label); break;
+ case 'js':
+ $label = rcmail::JQ($label);
+ break;
+ default:
+ $label = html::quote($label);
+ break;
}
- return !$attrib['noshow'] ? $label : '';
+
+ return $label;
}
break;