summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-08 09:40:39 +0000
committeralecpl <alec@alec.pl>2010-09-08 09:40:39 +0000
commit2aa2b332f6e216ceeabc36ef6b942c40d91bda5a (patch)
tree08a21f5cb3d9f7bc706fa34a73aba37baff9a03c /program/include/rcube_imap.php
parentec581c106e51a46f4536caec397e2b34821db5de (diff)
- Small performance improvements
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index c5b10e626..043d902bc 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3426,7 +3426,7 @@ class rcube_imap
$name = trim($val['name']);
if (preg_match('/^[\'"]/', $name) && preg_match('/[\'"]$/', $name))
- $name = preg_replace(array('/^[\'"]/', '/[\'"]$/'), '', $name);
+ $name = trim($name, '\'"');
if ($name && $address && $name != $address)
$string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
@@ -3458,7 +3458,7 @@ class rcube_imap
function decode_header($input, $remove_quotes=false)
{
$str = rcube_imap::decode_mime_string((string)$input, $this->default_charset);
- if ($str{0}=='"' && $remove_quotes)
+ if ($str[0] == '"' && $remove_quotes)
$str = str_replace('"', '', $str);
return $str;