diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-05-22 16:29:02 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-05-22 16:29:02 +0000 |
commit | caec9484b7ad9fdf1613db7b05955a14281b4b9c (patch) | |
tree | 7051ba57c916e57c76a72bad7eda19d19d9e00b0 /usr/local/www/status_captiveportal.php | |
parent | 32822c6e162ce612392aae9e0ffe83fe633c9ec8 (diff) | |
download | pfsense-caec9484b7ad9fdf1613db7b05955a14281b4b9c.zip pfsense-caec9484b7ad9fdf1613db7b05955a14281b4b9c.tar.gz |
A better fix to empty lines.
Diffstat (limited to 'usr/local/www/status_captiveportal.php')
-rwxr-xr-x | usr/local/www/status_captiveportal.php | 8 |
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];?> </td> |