mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Generalize pppoe server enabled check and use it elsewhere in the GUI that needed fixed. Still needs changes in filter.inc - Ticket #1243
This commit is contained in:
parent
0fc6be3f54
commit
93c2c1e620
@ -1039,6 +1039,22 @@ function is_dhcp_server_enabled()
|
||||
return $dhcpdenable;
|
||||
}
|
||||
|
||||
/* Any PPPoE servers enabled? */
|
||||
function is_pppoe_server_enabled() {
|
||||
global $config;
|
||||
|
||||
$pppoeenable = false;
|
||||
|
||||
if (!is_array($config['pppoes']) || !is_array($config['pppoes']['pppoe']))
|
||||
return false;
|
||||
|
||||
foreach ($config['pppoes']['pppoe'] as $pppoes)
|
||||
if ($pppoes['mode'] == 'server')
|
||||
$pppoeenable = true;
|
||||
|
||||
return $pppoeenable;
|
||||
}
|
||||
|
||||
function convert_seconds_to_hms($sec){
|
||||
$min=$hrs=0;
|
||||
if ($sec != 0){
|
||||
|
||||
@ -284,9 +284,8 @@ function typesel_change() {
|
||||
if(have_ruleint_access("pptp"))
|
||||
$interfaces['pptp'] = "PPTP VPN";
|
||||
|
||||
if ($config['pppoe']['mode'] == "server")
|
||||
if(have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
|
||||
/* add ipsec interfaces */
|
||||
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
|
||||
|
||||
@ -478,9 +478,8 @@ include("fbegin.inc"); ?>
|
||||
if(have_ruleint_access("pptp"))
|
||||
$interfaces['pptp'] = "PPTP VPN";
|
||||
|
||||
if ($config['pppoe']['mode'] == "server")
|
||||
if(have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
|
||||
/* add ipsec interfaces */
|
||||
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
|
||||
|
||||
@ -410,9 +410,8 @@ function poolopts_change() {
|
||||
if(have_ruleint_access("pptp"))
|
||||
$interfaces['pptp'] = "PPTP VPN";
|
||||
|
||||
if ($config['pppoe']['mode'] == "server")
|
||||
if(have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
|
||||
/* add ipsec interfaces */
|
||||
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
|
||||
|
||||
@ -683,9 +683,8 @@ include("head.inc");
|
||||
if(have_ruleint_access("pptp"))
|
||||
$interfaces['pptp'] = "PPTP VPN";
|
||||
|
||||
if ($config['pppoe']['mode'] == "server")
|
||||
if(have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
|
||||
$interfaces['pppoe'] = "PPPoE VPN";
|
||||
/* add ipsec interfaces */
|
||||
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
|
||||
if(have_ruleint_access("enc0"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user