diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-16 22:33:24 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-16 22:33:24 +0000 |
commit | 670fe8496ebd0f39e18cfad540ee1ad15db1766f (patch) | |
tree | e89aeed41dadee41dc51b6fbcf2572d1f7596cd3 /usr/local/www | |
parent | c09bb9c1169147c873d565cd4790f9a3adcc45c3 (diff) | |
download | pfsense-670fe8496ebd0f39e18cfad540ee1ad15db1766f.zip pfsense-670fe8496ebd0f39e18cfad540ee1ad15db1766f.tar.gz |
Add ajaxStarted which will tell if Ajax has started.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/index.php | 4 | ||||
-rw-r--r-- | usr/local/www/javascript/index/sajax.js | 7 | ||||
-rwxr-xr-x | usr/local/www/xmlrpc.php | 15 |
3 files changed, 14 insertions, 12 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 14bca30..65afb5f 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -123,7 +123,9 @@ ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> - +<script language="javascript"> +var ajaxStarted = false; +</script> <?php include("fbegin.inc"); if(!file_exists("/usr/local/www/themes/{$g['theme']}/no_big_logo")) diff --git a/usr/local/www/javascript/index/sajax.js b/usr/local/www/javascript/index/sajax.js index 8f1051f..b15aa2c 100644 --- a/usr/local/www/javascript/index/sajax.js +++ b/usr/local/www/javascript/index/sajax.js @@ -61,5 +61,10 @@ function updateState(x) document.getElementById("pfstate").value = x; } -window.setTimeout('updateMeters()', update_interval); + +/* start ajax helper "thread" if not started */ +if(!ajaxStarted) { + window.setTimeout('updateMeters()', update_interval); + var ajaxStarted = true; +} diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php index d63f7da..92d438a 100755 --- a/usr/local/www/xmlrpc.php +++ b/usr/local/www/xmlrpc.php @@ -165,20 +165,15 @@ function get_notices_xmlrpc($raw_params) { /*****************************/ $carp_configure_doc = 'Basic XMLRPC wrapper for configuring CARP interfaces.'; -$carp_configure_sig = array( - array( - $XML_RPC_Boolean, - $XML_RPC_String - ) - ); - +$carp_configure_sig = array(array($XML_RPC_Boolean, $XML_RPC_String)); + function interfaces_carp_configure_xmlrpc($raw_params) { - global $xmlrpc_g, $XML_RPC_Boolean, $XML_RPC_String; + global $xmlrpc_g; $params = xmlrpc_params_to_php($raw_params); - if(!xmlrpc_auth($params)) return new XML_RPC_Response(new XML_RPC_Value("auth_failure", $XML_RPC_String)); + if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail']; interfaces_carp_configure(); interfaces_carp_bring_up_final(); - return new XML_RPC_Response(new XML_RPC_Value(true, $XML_RPC_Boolean)); + return $xmlrpc_g['return']['true']; } /*****************************/ |