mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Don't show proxy configuration pages when GREEN is not available
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -99,6 +99,14 @@ require "${swroot}/langs/en.pl";
|
||||
require "${swroot}/langs/${language}.pl";
|
||||
eval `/bin/cat /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`;
|
||||
|
||||
sub green_used() {
|
||||
if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub orange_used () {
|
||||
if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
|
||||
return 1;
|
||||
@@ -170,6 +178,13 @@ sub genmenu {
|
||||
$menu->{'03.network'}{'subMenu'}->{'80.macadressmenu'}{'enabled'} = 0;
|
||||
$menu->{'03.network'}{'subMenu'}->{'90.wakeonlan'}{'enabled'} = 0;
|
||||
}
|
||||
|
||||
# Disable proxy when no GREEN is available
|
||||
if (!&green_used()) {
|
||||
$menu->{'03.network'}{'subMenu'}->{'20.proxy'}{'enabled'} = 0;
|
||||
$menu->{'03.network'}{'subMenu'}->{'21.urlfilter'}{'enabled'} = 0;
|
||||
$menu->{'03.network'}{'subMenu'}->{'22.updxlrator'}{'enabled'} = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user