From b9b0ec8f04d0093d8ba6bf2ae55f9867e876be50 Mon Sep 17 00:00:00 2001 From: Marcello Coutinho Date: Wed, 12 Mar 2014 18:38:51 -0300 Subject: squid3-dev - merge captive portal squid helper contribution by forum user dig1234 https://forum.pfsense.org/index.php?topic=72443.msg395218#msg395218 --- config/squid3/33/check_ip.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/squid3/33/check_ip.php b/config/squid3/33/check_ip.php index 6c65ff3f..e16cee0b 100644 --- a/config/squid3/33/check_ip.php +++ b/config/squid3/33/check_ip.php @@ -49,10 +49,11 @@ if ($pf_version > 2.0){ $dbhandle = sqlite_open("$dir/$file", 0666, $error); if ($dbhandle){ $query = "select * from captiveportal"; - $result = sqlite_query($dbhandle, $query); + $result = sqlite_array_query($dbhandle, $query, SQLITE_ASSOC); if ($result){ - $row = sqlite_fetch_array($result, SQLITE_ASSOC); - $cp_db[]=implode(",",$row); + foreach ($result as $rownum => $row){ + $cp_db[$rownum]=implode(",",$row); + } sqlite_close($dbhandle); } } -- cgit v1.2.3