summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_captiveportal.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/status_captiveportal.php')
-rwxr-xr-xusr/local/www/status_captiveportal.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr/local/www/status_captiveportal.php b/usr/local/www/status_captiveportal.php
index 1a3d7ca..056adc7 100755
--- a/usr/local/www/status_captiveportal.php
+++ b/usr/local/www/status_captiveportal.php
@@ -64,8 +64,7 @@ function clientcmp($a, $b) {
}
$cpdb = array();
-$cpcontents = `cat /var/db/captiveportal.db`;
-$cpcontents = explode("\n", $cpcontents);
+$cpcontents = file("/var/db/captiveportal.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($cpcontents as $cpcontent) {
$cpent = explode(",", $cpcontent);
if ($_GET['showact'])
@@ -99,10 +98,7 @@ if ($_GET['order']) {
<?php endif; ?>
<td class="list sort_ignore"></td>
</tr>
-<?php foreach ($cpdb as $cpent):
- if (empty($cpent[0]))
- continue;
-?>
+<?php foreach ($cpdb as $cpent): ?>
<tr>
<td class="listlr"><?=$cpent[2];?></td>
<td class="listr"><?=$cpent[3];?>&nbsp;</td>
OpenPOWER on IntegriCloud