diff options
author | thomascube <thomas@roundcube.net> | 2007-03-21 09:56:49 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2007-03-21 09:56:49 +0000 |
commit | 3cf664939b98befe8e9f9a8e3fa8a7e9a85a5745 (patch) | |
tree | 0ad6d7c9f0f7428a6a47ef7b624df38197d0a6ca /program/include/rcube_imap.inc | |
parent | ab6f8077e9b719db230798e658ba37f1f386b26b (diff) |
Minor bugfixes posted to the dev-mailing list
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r-- | program/include/rcube_imap.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 3463ae21b..871b6c1f4 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -2117,7 +2117,12 @@ class rcube_imap $j++; $address = $val['address']; $name = preg_replace(array('/^[\'"]/', '/[\'"]$/'), '', trim($val['name'])); - $string = $name!==$address ? sprintf('%s <%s>', strpos($name, ',')!==FALSE ? '"'.$name.'"' : $name, $address) : $address; + if ($name && $address && $name != $address) + $string = sprintf('%s <%s>', strpos($name, ',')!==FALSE ? '"'.$name.'"' : $name, $address); + else if ($address) + $string = $address; + else if ($name) + $string = $name; $out[$j] = array('name' => $name, 'mailto' => $address, @@ -2476,7 +2481,7 @@ class rcube_imap foreach ($sub_a as $k => $v) { - if ((strpos($v, '@') > 0) && (strpos($v, '.') > 0)) + if (strpos($v, '@') > 0) $result[$key]['address'] = str_replace('<', '', str_replace('>', '', $v)); else $result[$key]['name'] .= (empty($result[$key]['name'])?'':' ').str_replace("\"",'',stripslashes($v)); |