From d3c2fbf2d6d65f3d990d6b74eb2fc04ccea810b1 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 29 Aug 2012 03:46:40 -0400
Subject: [PATCH] Fix decoding of HTML messages with UTF-16 charset specified (#1488654)
---
program/include/rcube_template.php | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index b2bdda4..9344e10 100644
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -77,7 +77,9 @@
$this->set_env('x_frame_options', $this->app->config->get('x_frame_options', 'sameorigin'));
// load the correct skin (in case user-defined)
- $this->set_skin($this->config['skin']);
+ $skin = $this->app->config->get('skin');
+ $this->set_skin($skin);
+ $this->set_env('skin', $skin);
// add common javascripts
$this->add_script('var '.JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top');
@@ -156,7 +158,7 @@
$valid = true;
}
else {
- $skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : 'skins/default';
+ $skin_path = $this->config['skin_path'] ? $this->config['skin_path'] : rcube_config::DEFAULT_SKIN;
$valid = !$skin;
}
@@ -709,7 +711,15 @@
$vars = $attrib + array('product' => $this->config['product_name']);
unset($vars['name'], $vars['command']);
$label = rcube_label($attrib + array('vars' => $vars));
- return !$attrib['noshow'] ? (get_boolean((string)$attrib['html']) ? $label : Q($label)) : '';
+ $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 = JQ($label); break;
+ default: $label = Q($label); break;
+ }
+ return !$attrib['noshow'] ? $label : '';
}
break;
@@ -778,6 +788,13 @@
if (is_file(INSTALL_PATH . '.svn/entries')) {
if (preg_match('/Revision:\s(\d+)/', @shell_exec('svn info'), $regs))
$ver .= ' [SVN r'.$regs[1].']';
+ }
+ else if (is_file(INSTALL_PATH . '.git/index')) {
+ if (preg_match('/Date:\s+([^\n]+)/', @shell_exec('git log -1'), $regs)) {
+ if ($date = date('Ymd.Hi', strtotime($regs[1]))) {
+ $ver .= ' [GIT '.$date.']';
+ }
+ }
}
$content = Q($ver);
}
@@ -1120,6 +1137,9 @@
if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING']))
$url = $_SERVER['QUERY_STRING'];
+ // Disable autocapitalization on iPad/iPhone (#1488609)
+ $attrib['autocapitalize'] = 'off';
+
// set atocomplete attribute
$user_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
$host_attrib = $autocomplete > 0 ? array() : array('autocomplete' => 'off');
--
Gitblit v1.9.1