Author: leithoff
New Revision: 54982
URL: http://svn.stylite.de/viewvc/egroupware?rev=54982&view=rev
Log:
use Horde_Idna instead of egw_idna wrapper
Modified:
trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php
— trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php (original)
+++ trunk/emailadmin/inc/class.emailadmin_imapbase.inc.php Thu Feb 11 13:10:22 2016
@@ -150,13 +150,6 @@
static $specialUseFolders;
/**
@@ -403,7 +396,6 @@
}
if (is_null(self::$mailConfig)) self::$mailConfig = config::read('mail');
-
if (!isset(self::$idna2)) self::$idna2 = new egw_idna;
}
/**
@@ -866,8 +858,8 @@
}
catch (Exception $e)
{
-
error_log(__METHOD__.' ('.__LINE__.') '."->open connection for Server with profileID:".$_icServerID." failed!".$e->getMessage());
-
throw new egw_exception(__METHOD__." failed to ".__METHOD__." on Profile to $_icServerID :".$e->getMessage());
-
error_log(__METHOD__.' ('.__LINE__.') '."->open connection for Server with profileID:".$_icServerID." trying to examine ($mailbox) failed!".$e->getMessage());
-
throw new egw_exception(__METHOD__." failed to ".__METHOD__." on Profile to $_icServerID while trying to examine $mailbox:".$e->getMessage());
}
if (self::$debugTimes) self::logRunTimes($starttime,null,'ProfileID:'.$_icServerID,__METHOD__.' ('.__LINE__.') ');
}
@@ -1599,11 +1591,11 @@
}
//error_log(METHOD.’ (’.LINE.’) ‘.$headerObject[‘SUBJECT’].’->’.array2string($_headerObject->getEnvelope()->__get(‘from’)));
if(is_array($headerObject[‘FROM’]) && $headerObject[‘FROM’][0]) {
@@ -1611,7 +1603,7 @@
{
if ($k==0) continue;
//error_log(METHOD.’ (’.LINE.’) '."-> $k:".array2string($add));
@@ -1622,7 +1614,7 @@
foreach($headerObject[‘CC’] as $k => $add)
{
//error_log(METHOD.’ (’.LINE.’) '."-> $k:".array2string($add));
@@ -2116,31 +2108,23 @@
if ($_tryIDNConversion===true && stripos($_string,’@’)!==false)
{
$rfcAddr = self::parseAddressList($_string);
-
if (!isset(self::$idna2)) self::$idna2 = new egw_idna;
-
if (isset(self::$idna2))
-
{
-
$stringA = array();
-
//$_string = str_replace($rfcAddr[0]->host,self::$idna2->decode($rfcAddr[0]->host),$_string);
-
foreach ($rfcAddr as $_rfcAddr)
-
$stringA = array();
-
//$_string = str_replace($rfcAddr[0]->host,Horde_Idna::decode($rfcAddr[0]->host),$_string);
-
foreach ($rfcAddr as $_rfcAddr)
-
{
-
if (!$_rfcAddr->valid)
{
-
if (!$_rfcAddr->valid)
-
{
-
$stringA = array();
-
break; // skip idna conversion if we encounter an error here
-
}
-
$stringA[] = imap_rfc822_write_address($_rfcAddr->mailbox,self::$idna2->decode($_rfcAddr->host),$_rfcAddr->personal);
-
}
-
if (!empty($stringA)) $_string = implode(',',$stringA);
-
}
-
$stringA = array();
-
break; // skip idna conversion if we encounter an error here
-
}
-
$stringA[] = imap_rfc822_write_address($_rfcAddr->mailbox,Horde_Idna::decode($_rfcAddr->host),$_rfcAddr->personal);
-
}
-
if (!empty($stringA)) $_string = implode(',',$stringA);
}
if ($_tryIDNConversion==='FORCE')
{
-
if (!isset(self::$idna2)) self::$idna2 = new egw_idna;
-
if (isset(self::$idna2))
-
{
-
//error_log(__METHOD__.' ('.__LINE__.') '.'->'.$_string.'='.self::$idna2->decode($_string));
-
$_string = self::$idna2->decode($_string);
-
}
@@ -6041,7 +6025,7 @@
//$p = (string)$addressObject->personal;
$returnAddr .= (strlen($returnAddr)>0?’,’:’’);
//error_log(METHOD.’ (’.LINE.’) ‘.$p.’ <’.$mb.’@’.$h.’>’);
-
$buff = imap_rfc822_write_address($addressObject->mailbox, Horde_Idna::decode($addressObject->host), $addressObject->personal);
$buff = str_replace(array('<','>','"\'','\'"'),array('[',']','"','"'),$buff);
//error_log(__METHOD__.' ('.__LINE__.') '.' Address: '.$returnAddr);
$returnAddr .= $buff;
@@ -6458,7 +6442,7 @@
$activeMailProfiles = $this->mail->getAccountIdentities($this->profileID);
$activeMailProfile = self::getStandardIdentityForProfile($activeMailProfiles,$this->profileID);
-
$mailObject->addReplyTo(Horde_Idna::encode($activeMailProfile['ident_email']),emailadmin_imapbase::generateIdentityString($activeMailProfile,false));
}
foreach ($SendAndMergeTocontacts as $k => $val)
{
@@ -6492,7 +6476,7 @@
$nfn = ($contact[‘n_fn’] ? $contact[‘n_fn’] : $contact[‘n_given’].’ '.$contact[‘n_family’]);
if($email)
{
@@ -6548,7 +6532,7 @@
$nfn = ($contact[‘n_fn’] ? $contact[‘n_fn’] : $contact[‘n_given’].’ '.$contact[‘n_family’]);
if($email)
{
-
$mailObject->addAddress(Horde_Idna::encode($email),$mailObject->EncodeHeader($nfn));
}
}
$mailObject->addHeader('Subject', $bo_merge->merge_string($Subject, $val, $e, 'text/plain', array(), self::$displayCharset));
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs