mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 11:58:24 +01:00
fix warning in mail_compose::ajax_searchAddress
This commit is contained in:
parent
8c57206745
commit
69a36ad4e1
@ -1650,7 +1650,7 @@ class mail_compose
|
|||||||
}
|
}
|
||||||
$this->sessionData['body'] = mail_ui::resolve_inline_images($this->sessionData['body'], $_folder, $_uid, $_partID,'plain');
|
$this->sessionData['body'] = mail_ui::resolve_inline_images($this->sessionData['body'], $_folder, $_uid, $_partID,'plain');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($attachments = $mail_bo->getMessageAttachments($_uid,$_partID))) {
|
if(($attachments = $mail_bo->getMessageAttachments($_uid,$_partID))) {
|
||||||
foreach($attachments as $attachment) {
|
foreach($attachments as $attachment) {
|
||||||
$cid = $attachment['cid'];
|
$cid = $attachment['cid'];
|
||||||
@ -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