diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-08-12 16:53:28 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-08-12 16:53:28 +0000 |
commit | 89e3d8f3b28527997473039cf975efac094d3160 (patch) | |
tree | 9cd334b3a53b938da45d9863d1e5ef038171296a | |
parent | f7b35fcd38d9c2ee229b2a6c68e381e7789ffdbe (diff) | |
download | pfsense-89e3d8f3b28527997473039cf975efac094d3160.zip pfsense-89e3d8f3b28527997473039cf975efac094d3160.tar.gz |
Remove duplicate function portal_mac_fixed()
-rw-r--r-- | etc/inc/captiveportal.inc | 34 | ||||
-rwxr-xr-x | usr/local/captiveportal/index.php | 21 |
2 files changed, 17 insertions, 38 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 9474133..c41894d 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1100,24 +1100,24 @@ function getNasIP() } function portal_mac_fixed($clientmac) { - global $g ; + global $g ; - /* open captive portal mac db */ - if (file_exists("{$g['vardb_path']}/captiveportal_mac.db")) { - $fd = @fopen("{$g['vardb_path']}/captiveportal_mac.db","r") ; - if (!$fd) { - return FALSE; - } - while (!feof($fd)) { - $mac = trim(fgets($fd)) ; - if(strcasecmp($clientmac, $mac) == 0) { - fclose($fd) ; - return TRUE ; - } - } - fclose($fd) ; - } - return FALSE ; + /* open captive portal mac db */ + if (file_exists("{$g['vardb_path']}/captiveportal_mac.db")) { + $fd = @fopen("{$g['vardb_path']}/captiveportal_mac.db","r") ; + if (!$fd) { + return FALSE; + } + while (!feof($fd)) { + $mac = trim(fgets($fd)) ; + if(strcasecmp($clientmac, $mac) == 0) { + fclose($fd) ; + return TRUE ; + } + } + fclose($fd) ; + } + return FALSE ; } ?>
\ No newline at end of file diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 71a2d53..034dfa5 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -200,27 +200,6 @@ function portal_reply_page($redirurl, $type = null, $message = null) { echo $htmltext; } -function portal_mac_fixed($clientmac) { - global $g ; - - /* open captive portal mac db */ - if (file_exists("{$g['vardb_path']}/captiveportal_mac.db")) { - $fd = @fopen("{$g['vardb_path']}/captiveportal_mac.db","r") ; - if (!$fd) { - return FALSE; - } - while (!feof($fd)) { - $mac = trim(fgets($fd)) ; - if(strcasecmp($clientmac, $mac) == 0) { - fclose($fd) ; - return TRUE ; - } - } - fclose($fd) ; - } - return FALSE ; -} - function portal_mac_radius($clientmac,$clientip) { global $config ; |