Author: leithoff
Date: Mon Aug 13 18:33:59 2012
New Revision: 40122
URL:
http://svn.stylite.de/viewvc/egroupware?rev=40122&view=revLog:
some servers seem to sent their responses for the content not with the first EXT section, so we loop through the parsed response until we find some matching content
Modified:
trunk/egw-pear/Net/IMAP.php
Modified: trunk/egw-pear/Net/IMAP.php
URL:
http://svn.stylite.de/viewvc/egroupware/trunk/egw-pear/Net/IMAP.php?rev=40122&r1=40121&r2=40122&view=diff==============================================================================
--- trunk/egw-pear/Net/IMAP.php (original)
+++ trunk/egw-pear/Net/IMAP.php Mon Aug 13 18:33:59 2012
@@ -592,7 +592,12 @@
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
}
- $ret=$ret["PARSED"][0]["EXT"]["BODY[$partId]"]["CONTENT"];
+ $found = 0;
+ foreach($ret["PARSED"] as $key => $value)
+ {
+ if (isset($ret["PARSED"][$key]["EXT"]["BODY[$partId]"]["CONTENT"])) {$found = $key; break;}
+ }
+ $ret=$ret["PARSED"][$found]["EXT"]["BODY[$partId]"]["CONTENT"];
//$ret=$resp["PARSED"][0]["EXT"]["RFC822"]["CONTENT"];
return $ret;
}
@@ -1874,6 +1879,7 @@
if (PEAR::isError($ret)) {
return $ret;
}
+
if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
eGroupWare-cvs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs