[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/interface/class.interface_xmlrpc.php, 1.1.2.20
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/interface/class.interface_xmlrpc.php, 1.1.2.20 |
Date: |
Tue, 22 Jun 2004 17:42:43 +0200 |
Update of /api/interface
Modified Files:
Branch: proposal-branch
class.interface_xmlrpc.php
date: 2004/06/22 15:42:43; author: dcech; state: Exp; lines: +19 -18
Log Message:
minor response stuff in xmlrpc interface
fixed xmltool to not clobber embedded whitespace
=====================================================================
Index: api/interface/class.interface_xmlrpc.php
diff -u api/interface/class.interface_xmlrpc.php:1.1.2.19
api/interface/class.interface_xmlrpc.php:1.1.2.20
--- api/interface/class.interface_xmlrpc.php:1.1.2.19 Tue Jun 22 14:15:46 2004
+++ api/interface/class.interface_xmlrpc.php Tue Jun 22 15:42:43 2004
@@ -131,7 +131,7 @@
return $this->system_methodHelp();
}
- if(empty($this->method_result))
+ if(!isset($this->method_result))
{
$xml_result =
$GLOBALS['phpgw']->base_xml->export_xml();
$api_data = xml2var($xml_result);
@@ -251,32 +251,33 @@
function response($result = NOTSET)
{
+ if(empty($result) || $result == NOTSET)
+ {
+ $GLOBALS['phpgw']->finish(false);
+ $this->xmlrpc_fault('1', 'No Response.');
+ }
+
$response = "<?xml version=\"1.0\"?>\n";
$response .= "<methodResponse>\n";
+ $response .= $this->indent."<params>\n";
- if(!empty($result) && $result !== NOTSET)
+ if(is_array($result) && reset(array_keys($result)) ===
0)
{
- $response .= $this->indent."<params>\n";
-
- if(is_array($result) &&
reset(array_keys($result)) === 0)
- {
- foreach ($result as $val)
- {
- $response .=
str_repeat($this->indent,2)."<param>\n";
- $response .=
$this->add_vars($val,3);
- $response .=
str_repeat($this->indent,2)."</param>\n";
- }
- }
- else
+ foreach ($result as $val)
{
$response .=
str_repeat($this->indent,2)."<param>\n";
- $response .= $this->add_vars($result,3);
+ $response .= $this->add_vars($val,3);
$response .=
str_repeat($this->indent,2)."</param>\n";
}
-
- $response .= $this->indent."</params>\n";
+ }
+ else
+ {
+ $response .=
str_repeat($this->indent,2)."<param>\n";
+ $response .= $this->add_vars($result,3);
+ $response .=
str_repeat($this->indent,2)."</param>\n";
}
+ $response .= $this->indent."</params>\n";
$response .= '</methodResponse>';
return $response;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/interface/class.interface_xmlrpc.php, 1.1.2.20,
nomail <=