aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3/33
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2014-03-12 18:38:51 -0300
committerMarcello Coutinho <marcellocoutinho@gmail.com>2014-03-12 18:38:51 -0300
commitb9b0ec8f04d0093d8ba6bf2ae55f9867e876be50 (patch)
tree0841e35b53f9e502e73c90e7c2960428fd34ea4a /config/squid3/33
parent30ee4251923b097e269d8110ca3f7d2112fcd9b6 (diff)
downloadpfsense-packages-b9b0ec8f04d0093d8ba6bf2ae55f9867e876be50.tar.gz
pfsense-packages-b9b0ec8f04d0093d8ba6bf2ae55f9867e876be50.tar.bz2
pfsense-packages-b9b0ec8f04d0093d8ba6bf2ae55f9867e876be50.zip
squid3-dev - merge captive portal squid helper contribution by forum user dig1234
https://forum.pfsense.org/index.php?topic=72443.msg395218#msg395218
Diffstat (limited to 'config/squid3/33')
-rw-r--r--config/squid3/33/check_ip.php7
1 files changed, 4 insertions, 3 deletions
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);
}
}