summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-29 12:36:28 +0000
committeralecpl <alec@alec.pl>2010-09-29 12:36:28 +0000
commite99991996dbb9e7b0b0ff6cfa94dc0fb2522eb66 (patch)
tree8031feaef48d8d30de1253318993f8c0a2223674 /program/include/rcube_imap.php
parentd7f9eb573b82ca55c521b68f7cf3ad8de55ab8ba (diff)
- Add Internationalized Domain Name (IDNA) support (#1483894)
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 6f1294385..62996e2cd 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3505,7 +3505,7 @@ class rcube_imap
$address = trim($val['address']);
$name = trim($val['name']);
- if (preg_match('/^[\'"]/', $name) && preg_match('/[\'"]$/', $name))
+ if ($name && preg_match('/^[\'"]/', $name) && preg_match('/[\'"]$/', $name))
$name = trim($name, '\'"');
if ($name && $address && $name != $address)
@@ -3515,7 +3515,8 @@ class rcube_imap
else if ($name)
$string = $name;
- $out[$j] = array('name' => $name,
+ $out[$j] = array(
+ 'name' => $name,
'mailto' => $address,
'string' => $string
);
@@ -3912,9 +3913,9 @@ class rcube_imap
$result[$key]['name'] .= (empty($result[$key]['name'])?'':' ').str_replace("\"",'',stripslashes($v));
}
- if (empty($result[$key]['name']))
- $result[$key]['name'] = $result[$key]['address'];
- elseif (empty($result[$key]['address']))
+// if (empty($result[$key]['name']))
+// $result[$key]['name'] = $result[$key]['address'];
+ if (empty($result[$key]['address']))
$result[$key]['address'] = $result[$key]['name'];
}