summaryrefslogtreecommitdiffstats
path: root/usr/local/bin
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-02-06 10:40:32 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-02-06 15:54:47 -0200
commit5e5d5abc0f7d1906d8ae793e7665fd2056d37e4d (patch)
treedfa5f6f4cdf94d9f68418fb7579b460072b90e4d /usr/local/bin
parent3ec026a46af7feb94d67e483340b663105354f8d (diff)
downloadpfsense-5e5d5abc0f7d1906d8ae793e7665fd2056d37e4d.zip
pfsense-5e5d5abc0f7d1906d8ae793e7665fd2056d37e4d.tar.gz
Fix indent and whitespaces
Diffstat (limited to 'usr/local/bin')
-rw-r--r--usr/local/bin/captiveportal_gather_stats.php23
1 files changed, 11 insertions, 12 deletions
diff --git a/usr/local/bin/captiveportal_gather_stats.php b/usr/local/bin/captiveportal_gather_stats.php
index 823b28f..5e9f340 100644
--- a/usr/local/bin/captiveportal_gather_stats.php
+++ b/usr/local/bin/captiveportal_gather_stats.php
@@ -56,9 +56,9 @@ echo "N:";
if ($type == "loggedin") {
/* Find out the previous user timestamp
- * so we can determine the difference between the current
- * and previous user count. If the file is empty return a 0.
- */
+ * so we can determine the difference between the current
+ * and previous user count. If the file is empty return a 0.
+ */
$fd = @fopen($tmpfile, "r");
if ($fd) {
while (!feof($fd)) {
@@ -67,7 +67,7 @@ if ($type == "loggedin") {
$previous_user_timestamp = $line;
else
$previous_user_timestamp = 0;
- }
+ }
} else {
$previous_user_timestamp = 0;
}
@@ -75,13 +75,13 @@ if ($type == "loggedin") {
foreach($cpdb as $user) {
- $user_ip = $user[2];
+ $user_ip = $user[2];
// Record the timestamp
$timestamp = $user[0];
if ($timestamp > $previous_user_timestamp)
$current_user_count = $current_user_count + 1;
}
-
+
// Write out the latest timestamp but not if it is empty
if (!empty($timestamp)) {
$fd = @fopen($tmpfile, "w");
@@ -90,9 +90,9 @@ if ($type == "loggedin") {
}
@fclose($fd);
}
-
- /* If $timestamp is less than or equal to previous_user_timestamp return 0,
- * as we only want the 'X' number of users logged in since last RRD poll.
+
+ /* If $timestamp is less than or equal to previous_user_timestamp return 0,
+ * as we only want the 'X' number of users logged in since last RRD poll.
*/
if($timestamp <= $previous_user_timestamp)
$result = 0;
@@ -102,7 +102,6 @@ if ($type == "loggedin") {
} else
$result = $no_users;
-
echo "$result";
-
-?> \ No newline at end of file
+
+?>
OpenPOWER on IntegriCloud