phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121,1.122 class


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121,1.122 class.xmlrpc_server.inc.php,1.23,1.24 class.xmlrpcval.inc.php,1.7,1.8 xml_functions.inc.php,1.22,1.23 xmlrpc.interop.php,1.3,1.4
Date: Sat, 09 Feb 2002 16:19:25 -0500

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv20569

Modified Files:
        functions.inc.php class.xmlrpc_server.inc.php 
        class.xmlrpcval.inc.php xml_functions.inc.php 
        xmlrpc.interop.php 
Log Message:
Add one other weird exclusion in createobject() (this should fix passing 0
to xmlrpcval class for an int type; formatting;



Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -r1.121 -r1.122
*** functions.inc.php   13 Jan 2002 04:06:40 -0000      1.121
--- functions.inc.php   9 Feb 2002 21:19:22 -0000       1.122
***************
*** 228,232 ****
                global $phpgw_info, $phpgw;
  
!               if (is_object(@$GLOBALS['phpgw']->log) && $class != 
'phpgwapi.error' && $class != 'phpgwapi.errorlog')
                {
                        //$GLOBALS['phpgw']->log->write(array('text'=>'D-Debug, 
dbg: %1','p1'=>'This class was run: 
'.$class,'file'=>__FILE__,'line'=>__LINE__));
--- 228,232 ----
                global $phpgw_info, $phpgw;
  
!               if(is_object(@$GLOBALS['phpgw']->log) && $class != 
'phpgwapi.error' && $class != 'phpgwapi.errorlog')
                {
                        //$GLOBALS['phpgw']->log->write(array('text'=>'D-Debug, 
dbg: %1','p1'=>'This class was run: 
'.$class,'file'=>__FILE__,'line'=>__LINE__));
***************
*** 236,243 ****
                list($appname,$classname) = explode(".", $class);
  
!               if 
(!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
                        
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
                {
!                       
if(@file_exists(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'))
                        {
                                
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
--- 236,243 ----
                list($appname,$classname) = explode(".", $class);
  
!               
if(!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
                        
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
                {
!                       if(@file_exists(PHPGW_INCLUDE_ROOT . '/' . $appname . 
'/inc/class.' . $classname . '.inc.php'))
                        {
                                
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
***************
*** 251,255 ****
                
if($GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
                {
!                       if ($p1 == '_UNDEF_' && $p1 != 1)
                        {
                                eval('$obj = new ' . $classname . ';');
--- 251,255 ----
                
if($GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
                {
!                       if($p1 == '_UNDEF_' && $p1 != 1 && $p1 != '0')
                        {
                                eval('$obj = new ' . $classname . ';');
***************
*** 260,266 ****
                                $i = 1;
                                $code = '$obj = new ' . $classname . '(';
!                               while (list($x,$test) = each($input))
                                {
!                                       if (($test == '_UNDEF_' && $test != 1 ) 
|| $i == 17)
                                        {
                                                break;
--- 260,266 ----
                                $i = 1;
                                $code = '$obj = new ' . $classname . '(';
!                               while(list($x,$test) = each($input))
                                {
!                                       if(($test == '_UNDEF_' && $test != 1 && 
$test != '0') || $i == 17)
                                        {
                                                break;
***************
*** 421,425 ****
        function get_account_id($account_id = '',$default_id = '')
        {
!               if (gettype($account_id) == 'integer')
                {
                        return $account_id;
--- 421,425 ----
        function get_account_id($account_id = '',$default_id = '')
        {
!               if (is_int($account_id))
                {
                        return $account_id;

Index: class.xmlrpc_server.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.xmlrpc_server.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.xmlrpc_server.inc.php 29 Jan 2002 00:48:03 -0000      1.23
--- class.xmlrpc_server.inc.php 9 Feb 2002 21:19:22 -0000       1.24
***************
*** 196,220 ****
                                if ($recursed)
                                {
!                                       // Passing an integer of 0 to the 
xmlrpcval constructor results in the value being lost. (jengo)
!                                       if ($_type == 'int' && $_res == 0)
!                                       {
!                                               return 
CreateObject('phpgwapi.xmlrpcval','0',$_type);
!                                       }
!                                       else
!                                       {
!                                               return 
CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
!                                       }
                                }
                                else
                                {
!                                       // Passing an integer of 0 to the 
xmlrpcval constructor results in the value being lost. (jengo)
!                                       if ($_type == 'int' && $_res == 0)
!                                       {
!                                               $this->resp_struct[] = 
CreateObject('phpgwapi.xmlrpcval','0',$_type);
!                                       }
!                                       else
!                                       {
!                                               $this->resp_struct[] = 
CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
!                                       }
                                }
                        }
--- 196,204 ----
                                if ($recursed)
                                {
!                                       return 
CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
                                }
                                else
                                {
!                                       $this->resp_struct[] = 
CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
                                }
                        }
***************
*** 382,386 ****
                                                                
$this->resp_struct = array();
                                                                
$this->build_resp($res);
!                                                               
/*_debug_array($this->resp_struct); */
                                                                
@reset($this->resp_struct);
                                                                $r = 
CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->resp_struct,'struct'));
--- 366,370 ----
                                                                
$this->resp_struct = array();
                                                                
$this->build_resp($res);
!                                                               /* 
_debug_array($this->resp_struct); */
                                                                
@reset($this->resp_struct);
                                                                $r = 
CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->resp_struct,'struct'));

Index: class.xmlrpcval.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.xmlrpcval.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.xmlrpcval.inc.php     29 Jan 2002 00:48:03 -0000      1.7
--- class.xmlrpcval.inc.php     9 Feb 2002 21:19:22 -0000       1.8
***************
*** 29,47 ****
                        $this->mytype = 0;
  
!                       if ($val != -1 || $type != '')
                        {
!                               if ($type=='')
                                {
!                                       $type='string';
                                }
!                               if ($GLOBALS['xmlrpcTypes'][$type]==1)
                                {
                                        $this->addScalar($val,$type);
                                }
!                               elseif ($GLOBALS['xmlrpcTypes'][$type]==2)
                                {
                                        $this->addArray($val);
                                }
!                               elseif ($GLOBALS['xmlrpcTypes'][$type]==3)
                                {
                                        $this->addStruct($val);
--- 29,47 ----
                        $this->mytype = 0;
  
!                       if($val != -1 || $type != '')
                        {
!                               if($type == '')
                                {
!                                       $type = 'string';
                                }
!                               if($GLOBALS['xmlrpcTypes'][$type] == 1)
                                {
                                        $this->addScalar($val,$type);
                                }
!                               elseif($GLOBALS['xmlrpcTypes'][$type] == 2)
                                {
                                        $this->addArray($val);
                                }
!                               elseif($GLOBALS['xmlrpcTypes'][$type] == 3)
                                {
                                        $this->addStruct($val);
***************
*** 52,62 ****
                function addScalar($val, $type='string')
                {
!                       if ($this->mytype==1)
                        {
                                echo '<B>xmlrpcval</B>: scalar can have only 
one value<BR>';
                                return 0;
                        }
!                       $typeof=$GLOBALS['xmlrpcTypes'][$type];
!                       if ($typeof!=1)
                        {
                                echo '<B>xmlrpcval</B>: not a scalar type 
('.$typeof.')<BR>';
--- 52,62 ----
                function addScalar($val, $type='string')
                {
!                       if ($this->mytype == 1)
                        {
                                echo '<B>xmlrpcval</B>: scalar can have only 
one value<BR>';
                                return 0;
                        }
!                       $typeof = $GLOBALS['xmlrpcTypes'][$type];
!                       if ($typeof != 1)
                        {
                                echo '<B>xmlrpcval</B>: not a scalar type 
('.$typeof.')<BR>';
***************
*** 64,72 ****
                        }
                
!                       if ($type==xmlrpcBoolean)
                        {
!                               if (strcasecmp($val,'true')==0 || 
!                                       $val==1 || ($val==true && 
!                                       strcasecmp($val,'false')))
                                {
                                        $val=1;
--- 64,72 ----
                        }
                
!                       if ($type == xmlrpcBoolean)
                        {
!                               if (strcasecmp($val,'true') == 0 || 
!                                       $val == 1 ||
!                                       ($val == True && 
strcasecmp($val,'false')))
                                {
                                        $val=1;
***************
*** 78,93 ****
                        }
                
!                       if ($this->mytype==2)
                        {
                                // we're adding to an array here
!                               $ar=$this->me['array'];
                                $ar[] = CreateObject('phpgwapi.xmlrpcval',$val, 
$type);
!                               $this->me['array']=$ar;
                        }
                        else
                        {
                                // a scalar, so set the value and remember 
we're scalar
!                               $this->me[$type]=$val;
!                               $this->mytype=$typeof;
                        }
                        return 1;
--- 78,93 ----
                        }
                
!                       if ($this->mytype == 2)
                        {
                                // we're adding to an array here
!                               $ar = $this->me['array'];
                                $ar[] = CreateObject('phpgwapi.xmlrpcval',$val, 
$type);
!                               $this->me['array'] = $ar;
                        }
                        else
                        {
                                // a scalar, so set the value and remember 
we're scalar
!                               $this->me[$type] = $val;
!                               $this->mytype = $typeof;
                        }
                        return 1;
***************
*** 96,100 ****
                function addArray($vals)
                {
!                       if ($this->mytype!=0)
                        {
                                echo '<B>xmlrpcval</B>: already initialized as 
a [' . $this->kindOf() . ']<BR>';
--- 96,100 ----
                function addArray($vals)
                {
!                       if($this->mytype != 0)
                        {
                                echo '<B>xmlrpcval</B>: already initialized as 
a [' . $this->kindOf() . ']<BR>';
***************
*** 102,107 ****
                        }
  
!                       $this->mytype=$GLOBALS['xmlrpcTypes']['array'];
!                       $this->me['array']=$vals;
                        return 1;
                }
--- 102,107 ----
                        }
  
!                       $this->mytype = $GLOBALS['xmlrpcTypes']['array'];
!                       $this->me['array'] = $vals;
                        return 1;
                }
***************
*** 109,119 ****
                function addStruct($vals)
                {
!                       if ($this->mytype!=0)
                        {
                                echo '<B>xmlrpcval</B>: already initialized as 
a [' . $this->kindOf() . ']<BR>';
                                return 0;
                        }
!                       $this->mytype=$GLOBALS['xmlrpcTypes']['struct'];
!                       $this->me['struct']=$vals;
                        return 1;
                }
--- 109,119 ----
                function addStruct($vals)
                {
!                       if($this->mytype != 0)
                        {
                                echo '<B>xmlrpcval</B>: already initialized as 
a [' . $this->kindOf() . ']<BR>';
                                return 0;
                        }
!                       $this->mytype = $GLOBALS['xmlrpcTypes']['struct'];
!                       $this->me['struct'] = $vals;
                        return 1;
                }
***************
*** 122,133 ****
                {
                        reset($ar);
!                       while (list($key,$val) = each($ar))
                        {
                                echo $key.' => '.$val.'<br>';
!                               if ($key == 'array')
                                {
!                                       while (list($key2,$val2) = each($val))
                                        {
!                                               echo '-- '.$key2.' => 
'.$val2.'<br>';
                                        }
                                }
--- 122,133 ----
                {
                        reset($ar);
!                       while(list($key,$val) = each($ar))
                        {
                                echo $key.' => '.$val.'<br>';
!                               if($key == 'array')
                                {
!                                       while(list($key2,$val2) = each($val))
                                        {
!                                               echo '-- ' . $key2.' => ' . 
$val2 . '<br>';
                                        }
                                }
***************
*** 155,159 ****
                function serializedata($typ, $val)
                {
!                       $rs='';
                        if($typ)
                        {
--- 155,159 ----
                function serializedata($typ, $val)
                {
!                       $rs = '';
                        if($typ)
                        {
***************
*** 166,170 ****
                                                while(list($key2, 
$val2)=each($val))
                                                {
!                                                       $rs .= 
'<member><name>'.$key2.'</name>'."\n".$this->serializeval($val2).'</member>'."\n";
                                                }
                                                $rs .= '</struct>';
--- 166,170 ----
                                                while(list($key2, 
$val2)=each($val))
                                                {
!                                                       $rs .= '<member><name>' 
. $key2 . '</name>' . "\n" . $this->serializeval($val2) . '</member>' . "\n";
                                                }
                                                $rs .= '</struct>';
***************
*** 172,199 ****
                                        case 2:
                                                // array
!                                               $rs .= 
'<array>'."\n".'<data>'."\n";
                                                for($i=0; $i<sizeof($val); $i++)
                                                {
                                                        $rs .= 
$this->serializeval($val[$i]);
                                                }
!                                               $rs .= 
'</data>'."\n".'</array>';
                                                break;
                                        case 1:
!                                               $rs .= '<'.$typ.'>';
!                                               switch ($typ)
                                                {
                                                        case xmlrpcBase64:
!                                                               $rs.= 
base64_encode($val);
                                                                break;
                                                        case xmlrpcBoolean:
!                                                               $rs.= ($val ? 
'1' : '0');
                                                                break;
                                                        case xmlrpcString:
!                                                               $rs.= 
htmlspecialchars($val);
                                                                break;
                                                        default:
!                                                               $rs.= $val;
                                                }
!                                               $rs .= '</'.$typ.'>';
                                                break;
                                        default:
--- 172,199 ----
                                        case 2:
                                                // array
!                                               $rs .= '<array>' . "\n" . 
'<data>' . "\n";
                                                for($i=0; $i<sizeof($val); $i++)
                                                {
                                                        $rs .= 
$this->serializeval($val[$i]);
                                                }
!                                               $rs .= '</data>' . "\n" . 
'</array>';
                                                break;
                                        case 1:
!                                               $rs .= '<' . $typ . '>';
!                                               switch($typ)
                                                {
                                                        case xmlrpcBase64:
!                                                               $rs .= 
base64_encode($val);
                                                                break;
                                                        case xmlrpcBoolean:
!                                                               $rs .= ($val ? 
'1' : '0');
                                                                break;
                                                        case xmlrpcString:
!                                                               $rs .= 
htmlspecialchars($val);
                                                                break;
                                                        default:
!                                                               $rs .= $val;
                                                }
!                                               $rs .= '</' . $typ . '>';
                                                break;
                                        default:
***************
*** 211,221 ****
                function serializeval($o)
                {
!                       $rs='';
!                       $ar=$o->me;
                        reset($ar);
                        list($typ, $val) = each($ar);
!                       $rs.='<value>';
!                       $rs.= @$this->serializedata($typ, $val);
!                       $rs.='</value>'."\n";
                        return $rs;
                }
--- 211,221 ----
                function serializeval($o)
                {
!                       $rs = '';
!                       $ar = $o->me;
                        reset($ar);
                        list($typ, $val) = each($ar);
!                       $rs .= '<value>';
!                       $rs .=  @$this->serializedata($typ, $val);
!                       $rs .= '</value>' . "\n";
                        return $rs;
                }
***************
*** 223,227 ****
                function structmem($m)
                {
!                       $nv=$this->me['struct'][$m];
                        return $nv;
                }
--- 223,227 ----
                function structmem($m)
                {
!                       $nv = $this->me['struct'][$m];
                        return $nv;
                }
***************
*** 241,245 ****
                        // UNSTABLE
                        reset($this->me);
!                       list($a,$b)=each($this->me);
                        // contributed by I Sofer, 2001-03-24
                        // add support for nested arrays to scalarval
--- 241,245 ----
                        // UNSTABLE
                        reset($this->me);
!                       list($a,$b) = each($this->me);
                        // contributed by I Sofer, 2001-03-24
                        // add support for nested arrays to scalarval
***************
*** 247,251 ****
                        // preserve back compatibility
  
!                       if (is_array($b))
                        {
                                @reset($b);
--- 247,251 ----
                        // preserve back compatibility
  
!                       if(is_array($b))
                        {
                                @reset($b);
***************
*** 257,261 ****
  
                        // add support for structures directly encoding php 
objects
!                       if (is_object($b))
                        {
                                $t = get_object_vars($b);
--- 257,261 ----
  
                        // add support for structures directly encoding php 
objects
!                       if(is_object($b))
                        {
                                $t = get_object_vars($b);
***************
*** 278,282 ****
                {
                        reset($this->me);
!                       list($a,$b)=each($this->me);
                        return $b;
                }
--- 278,282 ----
                {
                        reset($this->me);
!                       list($a,$b) = each($this->me);
                        return $b;
                }
***************
*** 285,292 ****
                {
                        reset($this->me);
!                       list($a,$b)=each($this->me);
!                       if ($a==xmlrpcI4) 
                        {
!                               $a=xmlrpcInt;
                        }
                        return $a;
--- 285,292 ----
                {
                        reset($this->me);
!                       list($a,$b) = each($this->me);
!                       if ($a == xmlrpcI4) 
                        {
!                               $a = xmlrpcInt;
                        }
                        return $a;
***************
*** 295,299 ****
                function arraymem($m)
                {
!                       address@hidden>me['array'][$m];
                        return $nv;
                }
--- 295,299 ----
                function arraymem($m)
                {
!                       $nv = @$this->me['array'][$m];
                        return $nv;
                }
***************
*** 302,306 ****
                {
                        reset($this->me);
!                       list($a,$b)=each($this->me);
                        return sizeof($b);
                }
--- 302,306 ----
                {
                        reset($this->me);
!                       list($a,$b) = each($this->me);
                        return sizeof($b);
                }

Index: xml_functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/xml_functions.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** xml_functions.inc.php       28 Dec 2001 18:41:33 -0000      1.22
--- xml_functions.inc.php       9 Feb 2002 21:19:22 -0000       1.23
***************
*** 4,8 ****
        // xmlrpc.inc,v 1.18 2001/07/06 18:23:57 edmundd
  
!       // License is granted to use or modify this software ("XML-RPC for PHP")
        // for commercial or non-commercial use provided the copyright of the 
author
        // is preserved in any distributed or derivative work.
--- 4,8 ----
        // xmlrpc.inc,v 1.18 2001/07/06 18:23:57 edmundd
  
!       // License is granted to use or modify this software ('XML-RPC for PHP')
        // for commercial or non-commercial use provided the copyright of the 
author
        // is preserved in any distributed or derivative work.
***************
*** 23,27 ****
        if (!function_exists('xml_parser_create'))
        {
!               // Win 32 fix. From: "Leo West" <address@hidden>
                if($WINDIR)
                {
--- 23,27 ----
        if (!function_exists('xml_parser_create'))
        {
!               // Win 32 fix. From: 'Leo West' <address@hidden>
                if($WINDIR)
                {
***************
*** 126,130 ****
        //   cm - used to denote struct or array (comma needed)
        //   isf - used to indicate a fault
!       //   lv - used to indicate "looking for a value": implements
        //        the logic to allow values with no types to be strings
        //   params - used to store parameters in method calls
--- 126,130 ----
        //   cm - used to denote struct or array (comma needed)
        //   isf - used to indicate a fault
!       //   lv - used to indicate 'looking for a value': implements
        //        the logic to allow values with no types to be strings
        //   params - used to store parameters in method calls
***************
*** 315,320 ****
                                        }
                                }
!                               $GLOBALS['_xh'][$parser]['ac']=""; 
$GLOBALS['_xh'][$parser]['qt']=0;
!                               $GLOBALS['_xh'][$parser]['lv']=3; // indicate 
we've found a value
                                break;
                        case 'VALUE':
--- 315,321 ----
                                        }
                                }
!                               $GLOBALS['_xh'][$parser]['ac'] = '';
!                               $GLOBALS['_xh'][$parser]['qt'] = 0;
!                               $GLOBALS['_xh'][$parser]['lv'] = 3; // indicate 
we've found a value
                                break;
                        case 'VALUE':
***************
*** 326,330 ****
                                }
                                // This if() detects if no scalar was inside 
<VALUE></VALUE>
!                               // and pads an empty "".
                                
if($GLOBALS['_xh'][$parser]['st'][strlen($GLOBALS['_xh'][$parser]['st'])-1] == 
'(')
                                {
--- 327,331 ----
                                }
                                // This if() detects if no scalar was inside 
<VALUE></VALUE>
!                               // and pads an empty ''.
                                
if($GLOBALS['_xh'][$parser]['st'][strlen($GLOBALS['_xh'][$parser]['st'])-1] == 
'(')
                                {
***************
*** 334,346 ****
                                if ($GLOBALS['_xh'][$parser]['cm'])
                                {
!                                       $GLOBALS['_xh'][$parser]['st'].=",";
                                }
                                break;
                        case 'MEMBER':
!                               $GLOBALS['_xh'][$parser]['ac']="";
                                $GLOBALS['_xh'][$parser]['qt']=0;
                                break;
                        case 'DATA':
!                               $GLOBALS['_xh'][$parser]['ac']="";
                                $GLOBALS['_xh'][$parser]['qt']=0;
                                break;
--- 335,347 ----
                                if ($GLOBALS['_xh'][$parser]['cm'])
                                {
!                                       $GLOBALS['_xh'][$parser]['st'].=',';
                                }
                                break;
                        case 'MEMBER':
!                               $GLOBALS['_xh'][$parser]['ac']='';
                                $GLOBALS['_xh'][$parser]['qt']=0;
                                break;
                        case 'DATA':
!                               $GLOBALS['_xh'][$parser]['ac']='';
                                $GLOBALS['_xh'][$parser]['qt']=0;
                                break;
***************
*** 349,353 ****
                                break;
                        case 'METHODNAME':
!                               
$GLOBALS['_xh'][$parser]['method']=ereg_replace("^[\n\r\t ]+", "", 
$GLOBALS['_xh'][$parser]['ac']);
                                break;
                        case 'BOOLEAN':
--- 350,354 ----
                                break;
                        case 'METHODNAME':
!                               
$GLOBALS['_xh'][$parser]['method']=ereg_replace("^[\n\r\t ]+", '', 
$GLOBALS['_xh'][$parser]['ac']);
                                break;
                        case 'BOOLEAN':
***************
*** 381,385 ****
                if ($GLOBALS['_xh'][$parser]['lv']!=3)
                {
!                       // "lookforvalue==3" means that we've found an entire 
value
                        // and should discard any further character data
                        if ($GLOBALS['_xh'][$parser]['lv']==1)
--- 382,386 ----
                if ($GLOBALS['_xh'][$parser]['lv']!=3)
                {
!                       // 'lookforvalue==3' means that we've found an entire 
value
                        // and should discard any further character data
                        if ($GLOBALS['_xh'][$parser]['lv']==1)
***************
*** 427,443 ****
                if (!$utc)
                {
!                       $t=strftime("%Y%m%dT%H:%M:%S", $timet);
                }
                else
                {
!                       if (function_exists("gmstrftime")) 
                        {
                                // gmstrftime doesn't exist in some versions
                                // of PHP
!                               $t=gmstrftime("%Y%m%dT%H:%M:%S", $timet);
                        }
                        else
                        {
!                               $t=strftime("%Y%m%dT%H:%M:%S", 
$timet-date("Z"));
                        }
                }
--- 428,444 ----
                if (!$utc)
                {
!                       $t=strftime('%Y%m%dT%H:%M:%S', $timet);
                }
                else
                {
!                       if (function_exists('gmstrftime')) 
                        {
                                // gmstrftime doesn't exist in some versions
                                // of PHP
!                               $t=gmstrftime('%Y%m%dT%H:%M:%S', $timet);
                        }
                        else
                        {
!                               $t=strftime('%Y%m%dT%H:%M:%S', 
$timet-date('Z'));
                        }
                }
***************
*** 473,481 ****
                $kind = @$xmlrpc_val->kindOf();
  
!               if($kind == "scalar")
                {
                        return $xmlrpc_val->scalarval();
                }
!               elseif($kind == "array")
                {
                        $size = $xmlrpc_val->arraysize();
--- 474,482 ----
                $kind = @$xmlrpc_val->kindOf();
  
!               if($kind == 'scalar')
                {
                        return $xmlrpc_val->scalarval();
                }
!               elseif($kind == 'array')
                {
                        $size = $xmlrpc_val->arraysize();
***************
*** 488,492 ****
                        return $arr; 
                }
!               elseif($kind == "struct")
                {
                        $xmlrpc_val->structreset();
--- 489,493 ----
                        return $arr; 
                }
!               elseif($kind == 'struct')
                {
                        $xmlrpc_val->structreset();
***************
*** 520,525 ****
                switch($type)
                {
!                       case "array":
!                       case "object":
                                $arr = array();
                                while (list($k,$v) = each($php_val))
--- 521,526 ----
                switch($type)
                {
!                       case 'array':
!                       case 'object':
                                $arr = array();
                                while (list($k,$v) = each($php_val))
***************
*** 529,548 ****
                                $xmlrpc_val->addStruct($arr);
                                break;
!                       case "integer":
                                $xmlrpc_val->addScalar($php_val, xmlrpcInt);
                                break;
!                       case "double":
                                $xmlrpc_val->addScalar($php_val, xmlrpcDouble);
                                break;
!                       case "string":
                                $xmlrpc_val->addScalar($php_val, xmlrpcString);
                                break;
                        // <G_Giunta_2001-02-29>
                        // Add support for encoding/decoding of booleans, since 
they are supported in PHP
!                       case "boolean":
                                $xmlrpc_val->addScalar($php_val, xmlrpcBoolean);
                                break;
                        // </G_Giunta_2001-02-29>
!                       case "unknown type":
                        default:
                                $xmlrpc_val = false;
--- 530,549 ----
                                $xmlrpc_val->addStruct($arr);
                                break;
!                       case 'integer':
                                $xmlrpc_val->addScalar($php_val, xmlrpcInt);
                                break;
!                       case 'double':
                                $xmlrpc_val->addScalar($php_val, xmlrpcDouble);
                                break;
!                       case 'string':
                                $xmlrpc_val->addScalar($php_val, xmlrpcString);
                                break;
                        // <G_Giunta_2001-02-29>
                        // Add support for encoding/decoding of booleans, since 
they are supported in PHP
!                       case 'boolean':
                                $xmlrpc_val->addScalar($php_val, xmlrpcBoolean);
                                break;
                        // </G_Giunta_2001-02-29>
!                       case 'unknown type':
                        default:
                                $xmlrpc_val = false;
***************
*** 705,709 ****
                if($server_name)
                {
!                       list($sessionid,$kp3) = 
$GLOBALS['phpgw']->session->create_server($username.'@'.$server_name,$password,"text");
                }
                else
--- 706,710 ----
                if($server_name)
                {
!                       list($sessionid,$kp3) = 
$GLOBALS['phpgw']->session->create_server($username.'@'.$server_name,$password,'text');
                }
                else
***************
*** 717,721 ****
                                $user = $username;
                        }
!                       $sessionid = 
$GLOBALS['phpgw']->session->create($user,$password,"text");
                        $kp3 = $GLOBALS['phpgw']->session->kp3;
                        $domain = $GLOBALS['phpgw']->session->account_domain;
--- 718,722 ----
                                $user = $username;
                        }
!                       $sessionid = 
$GLOBALS['phpgw']->session->create($user,$password,'text');
                        $kp3 = $GLOBALS['phpgw']->session->kp3;
                        $domain = $GLOBALS['phpgw']->session->account_domain;

Index: xmlrpc.interop.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/xmlrpc.interop.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** xmlrpc.interop.php  4 Dec 2001 13:49:56 -0000       1.3
--- xmlrpc.interop.php  9 Feb 2002 21:19:22 -0000       1.4
***************
*** 490,494 ****
                                'ctQuotes'             => 
CreateObject('phpgwapi.xmlrpcval',$qu, 'int')
                        ),
!                    'struct'
                ));
        }
--- 490,494 ----
                                'ctQuotes'             => 
CreateObject('phpgwapi.xmlrpcval',$qu, 'int')
                        ),
!                       'struct'
                ));
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]