From aa370627b211a51dc46891cfa4b6e3d2ef3e52db Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Tue, 16 Jul 2013 10:45:17 -0400 Subject: [PATCH] - Fixed FS#2924 - the month will not set automatically in the autoresponder by click now Along with this fixed some display problems with the combo boxes introduced in 3.0.5. Some fields were not correctly displayed with the predefined values if value and text of the underlying option element differ. --- interface/lib/classes/ispcmail.inc.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php index e9534ec..d49af96 100644 --- a/interface/lib/classes/ispcmail.inc.php +++ b/interface/lib/classes/ispcmail.inc.php @@ -496,6 +496,10 @@ $this->_is_signed = true; } + private function _char_to_hex($matches) { + return '=' . strtoupper(dechex(ord($matches[1]))); + } + /** * Function to encode a header if necessary * according to RFC2047 @@ -504,7 +508,7 @@ private function _encodeHeader($input, $charset = 'ISO-8859-1') { preg_match_all('/(\s?\w*[\x80-\xFF]+\w*\s?)/', $input, $matches); foreach ($matches[1] as $value) { - $replacement = preg_replace('/([\x20\x80-\xFF])/e', '"=" . strtoupper(dechex(ord("\1")))', $value); + $replacement = preg_replace_callback('/([\x20\x80-\xFF])/', array($this, '_char_to_hex'), $value); $input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input); } -- Gitblit v1.9.1