summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-26 18:23:29 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-26 18:23:29 +0000
commit2fc0b1c7df46119e18fdf68d490cb896790d83e0 (patch)
treebd2426104bc5437aad7f070231010aff978a6cbc /usr
parent48906a096ca334924a3f3885d492fe03092f22a5 (diff)
downloadpfsense-2fc0b1c7df46119e18fdf68d490cb896790d83e0.zip
pfsense-2fc0b1c7df46119e18fdf68d490cb896790d83e0.tar.gz
require_once("config.inc") so that the $config structure is set for AJAX only queries
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/includes/functions.inc.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index 1d7da59..d87adcc 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -4,18 +4,19 @@ if(Connection_Aborted()) {
exit;
}
+require_once("config.inc");
- function get_stats() {
- $stats['cpu'] = cpu_usage();
- $stats['mem'] = mem_usage();
- $stats['uptime'] = get_uptime();
- $stats['states'] = get_pfstate();
- $stats['temp'] = get_temp();
+function get_stats() {
+ $stats['cpu'] = cpu_usage();
+ $stats['mem'] = mem_usage();
+ $stats['uptime'] = get_uptime();
+ $stats['states'] = get_pfstate();
+ $stats['temp'] = get_temp();
- $stats = join("|", $stats);
+ $stats = join("|", $stats);
- return $stats;
- }
+ return $stats;
+}
function get_uptime() {
OpenPOWER on IntegriCloud