summaryrefslogtreecommitdiffstats
path: root/usr/local/www/xmlrpc.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2009-12-30 21:25:02 -0500
committerScott Ullrich <sullrich@pfSense.org>2009-12-30 21:27:02 -0500
commit2c0dd581c56a0b3eed13aea965dbd139b3f46eb1 (patch)
tree1739f188284d5611f5f0779108de04cd40ad1bb5 /usr/local/www/xmlrpc.php
parent83ce905251f85499db5fba2bbfb949467083731b (diff)
downloadpfsense-2c0dd581c56a0b3eed13aea965dbd139b3f46eb1.zip
pfsense-2c0dd581c56a0b3eed13aea965dbd139b3f46eb1.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.
Diffstat (limited to 'usr/local/www/xmlrpc.php')
-rwxr-xr-xusr/local/www/xmlrpc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 281d0bf..5ac31ea 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -94,7 +94,11 @@ 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