From 77f4569d3d5b8483c8e0971a4aec61b177de9317 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 30 Dec 2009 21:25:31 -0500 Subject: When exec_php is called detect i the variable toreturn is present and if so forumulate it into a xmlresponse in order to return structured data. --- usr/local/www/xmlrpc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php index 564d58d..9fb5b32 100755 --- a/usr/local/www/xmlrpc.php +++ b/usr/local/www/xmlrpc.php @@ -83,11 +83,14 @@ function exec_php_xmlrpc($raw_params) { if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail']; $exec_php = $params[0]; eval($exec_php); - return $xmlrpc_g['return']['true']; + if($toreturn) { + $response = XML_RPC_encode($toreturn); + return new XML_RPC_Response($response); + } else + return $xmlrpc_g['return']['true']; } - /*****************************/ -- cgit v1.1