mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-31 02:21:28 +01:00
fix warning in mail_compose::ajax_searchAddress
This commit is contained in:
parent
8c57206745
commit
69a36ad4e1
@ -3308,7 +3308,15 @@ class mail_compose
|
|||||||
foreach($contacts as $contact) {
|
foreach($contacts as $contact) {
|
||||||
foreach(array($contact['email'],$contact['email_home']) as $email) {
|
foreach(array($contact['email'],$contact['email_home']) as $email) {
|
||||||
// avoid wrong addresses, if an rfc822 encoded address is in addressbook
|
// avoid wrong addresses, if an rfc822 encoded address is in addressbook
|
||||||
$email = preg_replace("/(^.*<)([a-zA-Z0-9_\-]+@[a-zA-Z0-9_\-\.]+)(.*)/",'$2',$email);
|
//$email = preg_replace("/(^.*<)([a-zA-Z0-9_\-]+@[a-zA-Z0-9_\-\.]+)(.*)/",'$2',$email);
|
||||||
|
$rfcAddr = emailadmin_imapbase::parseAddressList($email);
|
||||||
|
$_rfcAddr=$rfcAddr->first();
|
||||||
|
if (!$_rfcAddr->valid)
|
||||||
|
{
|
||||||
|
break; // skip address if we encounter an error here
|
||||||
|
}
|
||||||
|
$email = $_rfcAddr->mailbox.'@'.$_rfcAddr->host;
|
||||||
|
|
||||||
if (method_exists($GLOBALS['egw']->contacts,'search'))
|
if (method_exists($GLOBALS['egw']->contacts,'search'))
|
||||||
{
|
{
|
||||||
$contact['n_fn']='';
|
$contact['n_fn']='';
|
||||||
|
Loading…
Reference in New Issue
Block a user