From 5712bf7b91964e6dbbd2afdead94bb3dd8c0030a Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Fri, 4 Jan 2013 14:24:55 +0100 Subject: Ability to use Mathjax for TeX rendering --- xmlrpc-utils.php | 119 +++++++++++++++++++++++++++---------------------------- 1 file changed, 59 insertions(+), 60 deletions(-) (limited to 'xmlrpc-utils.php') diff --git a/xmlrpc-utils.php b/xmlrpc-utils.php index a671d75..94f1062 100644 --- a/xmlrpc-utils.php +++ b/xmlrpc-utils.php @@ -1,40 +1,40 @@ 'xmlrpc'); - } + // default values + if(!$port) { + $port = 80; + } + if(!$uri) { + $uri = '/'; + } + if(!isset($output)) { + $output = array('version' => 'xmlrpc'); + } $response_buf = ""; if ($host && $uri && $port) { @@ -221,21 +221,21 @@ function xu_rpc_http_concise($params) { } /* call an xmlrpc method on a remote http server. legacy support. */ -function xu_rpc_http($method, $args, $host, $uri="/", $port=80, $debug=false, +function xu_rpc_http($method, $args, $host, $uri="/", $port=80, $debug=false, $timeout=0, $user=false, $pass=false, $secure=false) { - return xu_rpc_http_concise( - array( - method => $method, - args => $args, - host => $host, - uri => $uri, - port => $port, - debug => $debug, - timeout => $timeout, - user => $user, - pass => $pass, - secure => $secure - )); + return xu_rpc_http_concise( + array( + method => $method, + args => $args, + host => $host, + uri => $uri, + port => $port, + debug => $debug, + timeout => $timeout, + user => $user, + pass => $pass, + secure => $secure + )); } @@ -266,4 +266,3 @@ function dbg2($msg, $debug_level) { dbg($msg); } } - -- cgit v1.2.3