diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2009-12-30 21:25:31 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2009-12-30 21:25:31 -0500 |
commit | 77f4569d3d5b8483c8e0971a4aec61b177de9317 (patch) | |
tree | 909c0ac211a3f48065ec0844987f0615fe3283af | |
parent | 6eddeb954a6859d76fa8c210fa267569403f0062 (diff) | |
download | pfsense-77f4569d3d5b8483c8e0971a4aec61b177de9317.zip pfsense-77f4569d3d5b8483c8e0971a4aec61b177de9317.tar.gz |
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.
-rwxr-xr-x | usr/local/www/xmlrpc.php | 7 |
1 files 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']; } - /*****************************/ |