R26594 - in /trunk/egw-pear/Net: IMAP.php IMAPProtocol.php

Author: leithoff
New Revision: 26594

URL: http://www.egroupware.org/viewvc/egroupware?rev=3D26594&view=3Drev
Log:
fixing 2 problems regarding the communication with a dovecotserver. CAPABIL=
ITIES and parseStructureCommonFields

Modified:
trunk/egw-pear/Net/IMAP.php
trunk/egw-pear/Net/IMAPProtocol.php

Modified: trunk/egw-pear/Net/IMAP.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/egw-pear/Net/IMAP.ph=
p?rev=3D26594&r1=3D26593&r2=3D26594&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
— trunk/egw-pear/Net/IMAP.php (original)
+++ trunk/egw-pear/Net/IMAP.php Thu Mar 5 11:39:36 2009
@@ -840,10 +840,19 @@
*/
function _parseStructureCommonFields(&$_structure) =

 {
  •   #error_log(__METHOD__.print_r($_structure,true)." ".function_backtrace()=
    

);
#print “Net_IMAP::_parseStructureTextArray _partID: $_partID
”;
$part =3D new stdClass;
$part->type =3D strtoupper($_structure[0]);

  •    $part->subType =3D strtoupper($_structure[1]);
    
  •   //dovecot has no subtype for type attachment, and does not pass it as st=
    

ructure[2]

  •    if (!is_array($_structure[1])) $part->subType =3D strtoupper($_str=
    

ucture[1]);

  •   if(is_array($_structure[1])) {
    
  •   	foreach($_structure[1] as $key =3D> $value) {
    
  •   		if($key%2 =3D=3D 0) {
    
  •   			$part->parameters[strtoupper($_structure[1][$key])] =3D $_structure[1=
    

][$key+1];

  •   		}
    
  •   	}
    
  •   }
       if(is_array($_structure[2])) {
         foreach($_structure[2] as $key =3D> $value) {
           if($key%2 =3D=3D 0) {
    

Modified: trunk/egw-pear/Net/IMAPProtocol.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/egw-pear/Net/IMAPPro=
tocol.php?rev=3D26594&r1=3D26593&r2=3D26594&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
— trunk/egw-pear/Net/IMAPProtocol.php (original)
+++ trunk/egw-pear/Net/IMAPProtocol.php Thu Mar 5 11:39:36 2009
@@ -1006,7 +1006,13 @@
$ret =3D $this->_genericCommand( ‘CAPABILITY’ );

     if(isset( $ret["PARSED"] ) ){
  •        $ret["PARSED"]=3D$ret["PARSED"][0]["EXT"]["CAPABILITY"];
    
  •   	foreach($ret["PARSED"] as $substruct) {
    
  •   		if ($substruct["COMMAND"] =3D=3D "CAPABILITY") {
    
  •   			$subrv=3D$substruct["EXT"]["CAPABILITY"];
    
  •   			break;
    
  •   		}
    
  •   	}
    
  •        $ret["PARSED"]=3D$subrv;
           //fill the $this->_serverAuthMethods and $this->_serverSupport=
    

edCapabilities arrays
foreach( $ret[“PARSED”][“CAPABILITIES”] as $auth_method ){
if( strtoupper( substr( $auth_method , 0 ,5 ) ) =3D=3D “AU=
TH=3D” )
@@ -2878,8 +2884,8 @@
$ext_arr=3D$this->_getEXTarray($str_aux);
//$ext_arr=3Darray($token=3D>$this->getEXTarray($str=
aux));
}else{

  •                $ext_arr=3D$str_line;
    
  •                //$ext_arr=3Darray($token=3D>$str_line);
    
  •                //$ext_arr=3D$str_line;
    
  •                $ext_arr=3Darray($token=3D>$str_line);
               }
               $result_array =3D  $ext_arr;
               return $result_array;
    

Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs