summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
committeralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
commit382b8b1351e1a4598f04ab184cec803b96d7e4b7 (patch)
tree4a168a018618445f53afd5aa651fb655e68149d9 /program
parent5228a5558f0ee9af785f1b4cdcef4d97b17b33f6 (diff)
- Applied fixes from trunk
Diffstat (limited to 'program')
-rw-r--r--program/include/rcmail.php12
-rw-r--r--program/include/rcube_browser.php2
-rw-r--r--program/localization/index.inc4
-rw-r--r--program/steps/utils/spell_googie.inc2
-rw-r--r--program/steps/utils/spell_html_googie.inc2
5 files changed, 11 insertions, 11 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index e1dc22d07..8b4383e10 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1105,12 +1105,9 @@ class rcmail
*/
public function get_request_token()
{
- $key = $this->task;
-
- if (!$_SESSION['request_tokens'][$key])
- $_SESSION['request_tokens'][$key] = md5(uniqid($key . mt_rand(), true));
-
- return $_SESSION['request_tokens'][$key];
+ $sess_id = $_COOKIE[ini_get('session.name')];
+ if (!$sess_id) $sess_id = session_id();
+ return md5('RT' . $this->task . $this->config->get('des_key') . $sess_id);
}
@@ -1123,7 +1120,8 @@ class rcmail
public function check_request($mode = RCUBE_INPUT_POST)
{
$token = get_input_value('_token', $mode);
- return !empty($token) && $_SESSION['request_tokens'][$this->task] == $token;
+ $sess_id = $_COOKIE[ini_get('session.name')];
+ return !empty($sess_id) && $token == $this->get_request_token();
}
diff --git a/program/include/rcube_browser.php b/program/include/rcube_browser.php
index d080c605d..d74ec708a 100644
--- a/program/include/rcube_browser.php
+++ b/program/include/rcube_browser.php
@@ -42,7 +42,7 @@ class rcube_browser
$this->ns4 = strstr($HTTP_USER_AGENT, 'mozilla/4') && !strstr($HTTP_USER_AGENT, 'msie');
$this->ns = ($this->ns4 || strstr($HTTP_USER_AGENT, 'netscape'));
$this->ie = !$this->opera && strstr($HTTP_USER_AGENT, 'compatible; msie');
- $this->mz = strstr($HTTP_USER_AGENT, 'mozilla/5');
+ $this->mz = !$this->ie && strstr($HTTP_USER_AGENT, 'mozilla/5');
$this->chrome = strstr($HTTP_USER_AGENT, 'chrome');
$this->khtml = strstr($HTTP_USER_AGENT, 'khtml');
$this->safari = !$this->chrome && ($this->khtml || strstr($HTTP_USER_AGENT, 'safari'));
diff --git a/program/localization/index.inc b/program/localization/index.inc
index 5f33792ca..9925a87a5 100644
--- a/program/localization/index.inc
+++ b/program/localization/index.inc
@@ -42,8 +42,8 @@ $rcube_languages = array(
'cs_CZ' => 'Czech (Česky)',
'da_DK' => 'Danish (Dansk)',
'fa_AF' => 'Dari (ﻯﺭﺩ)',
- 'de_DE' => 'Deutsch (Deutsch)',
- 'de_CH' => 'Deutsch (Schweiz)',
+ 'de_DE' => 'German (Deutsch)',
+ 'de_CH' => 'German (Schweiz)',
'nl_NL' => 'Dutch (Nederlands)',
'en_GB' => 'English (GB)',
'en_US' => 'English (US)',
diff --git a/program/steps/utils/spell_googie.inc b/program/steps/utils/spell_googie.inc
index 4c98dd697..269d792dd 100644
--- a/program/steps/utils/spell_googie.inc
+++ b/program/steps/utils/spell_googie.inc
@@ -41,6 +41,8 @@ if (!empty($CONFIG['spellcheck_uri']))
}
$data = file_get_contents('php://input');
+// Google has some problem with spaces, use \n instead
+$data = str_replace(' ', "\n", $data);
$store = "";
if ($fp = fsockopen($host, $port, $errno, $errstr, 30))
diff --git a/program/steps/utils/spell_html_googie.inc b/program/steps/utils/spell_html_googie.inc
index 1a4fbd48d..df18c036b 100644
--- a/program/steps/utils/spell_html_googie.inc
+++ b/program/steps/utils/spell_html_googie.inc
@@ -80,7 +80,7 @@ if (!empty($CONFIG['spellcheck_uri']))
$path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $lang;
}
-$wordstr = implode(' ', (array) $data);
+$wordstr = implode("\n", (array) $data);
$data = '<?xml version="1.0" encoding="utf-8" ?>'
.'<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">'
.'<text>' . $wordstr . '</text>'