[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/rpc class.rpc_xmlrpc.php,1.1.2.5,1.1.2.6
From: |
Dan Kuykendall <address@hidden> |
Subject: |
[Phpgroupware-cvs] api/rpc class.rpc_xmlrpc.php,1.1.2.5,1.1.2.6 |
Date: |
Wed, 29 Oct 2003 02:19:07 +0000 |
Update of /cvsroot/phpgroupware/api/rpc
In directory subversions:/tmp/cvs-serv1729/api/rpc
Modified Files:
Tag: proposal-branch
class.rpc_xmlrpc.php
Log Message:
corrected parsing routine. Still have another small additional feature to add
Index: class.rpc_xmlrpc.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/rpc/Attic/class.rpc_xmlrpc.php,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** class.rpc_xmlrpc.php 28 Oct 2003 10:09:36 -0000 1.1.2.5
--- class.rpc_xmlrpc.php 29 Oct 2003 02:19:05 -0000 1.1.2.6
***************
*** 30,33 ****
--- 30,34 ----
var $method_result;
var $indent = '';
+ var $first_input = True;
function api_rpc()
***************
*** 268,290 ****
}
! if($this->op != 'api.base.login' &&
is_array($GLOBALS['methodCall']['params']))
! {
!
if(isset($GLOBALS['methodCall']['params']['param']['value']['base64']))
! {
!
$GLOBALS['HTTP_GET_VARS']['sid'] =
base64_decode($GLOBALS['methodCall']['params']['param']['value']['base64']);
!
unset($GLOBALS['methodCall']['params']);
! }
!
elseif(isset($GLOBALS['methodCall']['params']['param'][0]['value']['base64']))
! {
!
$GLOBALS['HTTP_GET_VARS']['sid'] =
base64_decode($GLOBALS['methodCall']['params']['param'][0]['value']['base64']);
!
unset($GLOBALS['methodCall']['params']['param'][0]);
! }
! else
! {
! /* not a valid session */
! /* means that things will run
as anonymous */
! }
! }
! if(is_array($GLOBALS['methodCall']['params'])
&& count($GLOBALS['methodCall']['params']) > 0)
{
$this->parse_params($GLOBALS['methodCall']['params']);
--- 269,273 ----
}
! if(is_array($GLOBALS['methodCall']['params']))
{
$this->parse_params($GLOBALS['methodCall']['params']);
***************
*** 305,309 ****
foreach($val as $subkey=>$subval)
{
! $this->parse_param_sub($subval);
}
}
--- 288,299 ----
foreach($val as $subkey=>$subval)
{
! if(is_array($subval))
! {
!
$this->parse_params($subval);
! }
! else
! {
!
$this->parse_param_sub($subval);
! }
}
}
***************
*** 315,319 ****
if(!is_array($param['value']))
{
! $this->inputs[] = $param['value'];
}
else
--- 305,325 ----
if(!is_array($param['value']))
{
! if($this->first_input)
! {
! $GLOBALS['HTTP_GET_VARS']['sid'] =
$param['value'];
! }
! else
! {
! if(isset($param['name']))
! {
! $this->inputs[$param['name']] =
$param['value'][$type];
! }
! else
! {
! $this->inputs[] =
$param['value'][$type];
! }
! $this->inputs[] = $param['value'];
! $this->first_input = False;
! }
}
else
***************
*** 322,329 ****
--- 328,344 ----
switch ($type)
{
+ case 'struct':
+ case 'member':
+
$this->parse_params($param['value']);
+ break;
case 'base64':
$val['value'][$type] =
base64_decode($param['value'][$type]);
+ if($this->first_input)
+ {
+
$GLOBALS['HTTP_GET_VARS']['sid'] = $val['value'][$type];
+ }
case 'boolean':
settype($param['value'][$type],'boolean');
+ case 'int':
case 'i4':
case 'double':
***************
*** 331,335 ****
case 'string':
default:
! $this->inputs[] =
$param['value'][$type];
}
}
--- 346,361 ----
case 'string':
default:
! if(!$this->first_input)
! {
!
if(isset($param['name']))
! {
!
$this->inputs[$param['name']] = $param['value'][$type];
! }
! else
! {
! $this->inputs[]
= $param['value'][$type];
! }
! }
! $this->first_input = False;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/rpc class.rpc_xmlrpc.php,1.1.2.5,1.1.2.6,
Dan Kuykendall <address@hidden> <=