mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Formatting
This commit is contained in:
parent
3e8e749624
commit
bf10b87e07
@ -3,7 +3,7 @@
|
||||
// <edd@usefulinc.com>
|
||||
// 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")
|
||||
// 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.
|
||||
|
||||
@ -18,12 +18,14 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
class xmlrpcmsg
|
||||
{
|
||||
var $payload;
|
||||
var $methodname;
|
||||
var $params = array();
|
||||
var $debug=0;
|
||||
var $debug = 1;
|
||||
|
||||
function xmlrpcmsg($meth, $pars=0)
|
||||
{
|
||||
@ -51,7 +53,8 @@
|
||||
{
|
||||
$this->payload = $this->xml_header();
|
||||
$this->payload .= '<methodName>' . $this->methodname . '</methodName>' . "\n";
|
||||
// if (sizeof($this->params)) {
|
||||
if (sizeof($this->params))
|
||||
{
|
||||
$this->payload .= '<params>' . "\n";
|
||||
for($i=0; $i<sizeof($this->params); $i++)
|
||||
{
|
||||
@ -59,7 +62,7 @@
|
||||
$this->payload .= '<param>' . "\n" . $p->serialize() . '</param>' . "\n";
|
||||
}
|
||||
$this->payload .= '</params>' . "\n";
|
||||
// }
|
||||
}
|
||||
$this->payload .= $this->xml_footer();
|
||||
$this->payload = str_replace("\n", "\r\n", $this->payload);
|
||||
}
|
||||
@ -79,9 +82,20 @@
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
function addParam($par) { $this->params[]=$par; }
|
||||
function getParam($i) { return $this->params[$i]; }
|
||||
function getNumParams() { return sizeof($this->params); }
|
||||
function addParam($par)
|
||||
{
|
||||
$this->params[] = $par;
|
||||
}
|
||||
|
||||
function getParam($i)
|
||||
{
|
||||
return $this->params[$i];
|
||||
}
|
||||
|
||||
function getNumParams()
|
||||
{
|
||||
return sizeof($this->params);
|
||||
}
|
||||
|
||||
function parseResponseFile($fp)
|
||||
{
|
||||
@ -106,9 +120,9 @@
|
||||
$GLOBALS['_xh'][$parser]['qt'] = '';
|
||||
|
||||
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
|
||||
xml_set_element_handler($parser, "xmlrpc_se", "xmlrpc_ee");
|
||||
xml_set_character_data_handler($parser, "xmlrpc_cd");
|
||||
xml_set_default_handler($parser, "xmlrpc_dh");
|
||||
xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee');
|
||||
xml_set_character_data_handler($parser, 'xmlrpc_cd');
|
||||
xml_set_default_handler($parser, 'xmlrpc_dh');
|
||||
// $xmlrpc_value = CreateObject('phpgwapi.xmlrpcval');
|
||||
|
||||
$hdrfnd=0;
|
||||
@ -143,7 +157,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$errstr = sprintf("XML error: %s at line %d",
|
||||
$errstr = sprintf('XML error: %s at line %d',
|
||||
xml_error_string(xml_get_error_code($parser)),
|
||||
xml_get_current_line_number($parser));
|
||||
}
|
||||
@ -155,9 +169,9 @@
|
||||
xml_parser_free($parser);
|
||||
if ($this->debug)
|
||||
{
|
||||
print '<PRE>---EVALING---[' .
|
||||
strlen($GLOBALS['_xh'][$parser]['st']) . ' chars]---'."\n" .
|
||||
htmlspecialchars($GLOBALS['_xh'][$parser]['st']) . ';'."\n".'---END---</PRE>';
|
||||
echo '<PRE>---EVALING---['
|
||||
. strlen($GLOBALS['_xh'][$parser]['st']) . ' chars]---' . "\n"
|
||||
. htmlspecialchars($GLOBALS['_xh'][$parser]['st']) . ';' . "\n" . '---END---</PRE>';
|
||||
}
|
||||
if (strlen($GLOBALS['_xh'][$parser]['st']) == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user