summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-07-15 22:03:17 +0000
committerColin Smith <colin@pfsense.org>2005-07-15 22:03:17 +0000
commitd906426767ab951ef1b760046aab433cbc048137 (patch)
tree2a38ca5da83c30e3ddb539e2b0b91e1b8fd3a6c5 /usr
parent2efbd0610194aa5286299ef26b74e1ce8c996e98 (diff)
downloadpfsense-d906426767ab951ef1b760046aab433cbc048137.zip
pfsense-d906426767ab951ef1b760046aab433cbc048137.tar.gz
Add pfsense.get_notices.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/xmlrpc.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index b8f123d..efbc743 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -107,6 +107,21 @@ function reboot_xmlrpc($raw_params) {
return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
}
+$get_notices_sig = array(array(array(), string), array(array()));
+function get_notices_xmlrpc($raw_params) {
+ global $g;
+ require_once("notices.inc");
+ $params = xmlrpc_params_to_php($raw_params);
+ if(!$params[0]) {
+ $toreturn = get_notices();
+ } else {
+ $toreturn = get_notices($params[0]);
+ }
+ $response = new XML_RPC_Response(XML_RPC_encode($toreturn));
+ print $response->serialize();
+ return $response;
+}
+
$server = new XML_RPC_Server(
array(
'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc',
@@ -126,7 +141,9 @@ $server = new XML_RPC_Server(
// 'docstring' => $auto_update_doc),
'pfsense.reboot' => array('function' => 'reboot_xmlrpc',
'signature' => $reboot_sig,
- 'docstring' => $reboot_doc)
+ 'docstring' => $reboot_doc),
+ 'pfsense.get_notices' => array('function' => 'get_notices_xmlrpc',
+ 'signature' => $get_notices_sig)
)
);
?>
OpenPOWER on IntegriCloud