summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2009-12-30 21:25:31 -0500
committerScott Ullrich <sullrich@pfSense.org>2009-12-30 21:25:31 -0500
commit77f4569d3d5b8483c8e0971a4aec61b177de9317 (patch)
tree909c0ac211a3f48065ec0844987f0615fe3283af
parent6eddeb954a6859d76fa8c210fa267569403f0062 (diff)
downloadpfsense-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-xusr/local/www/xmlrpc.php7
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'];
}
-
/*****************************/
OpenPOWER on IntegriCloud