X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Fcfgroot%2Fheader.pl;h=299d7664599290d5a7a4c828746d58c820d0d633;hp=bbb0eca79c88e25a70b7135ed878635d3cad8d81;hb=e2eb09157ee4e40b383319cfcf16ad69fc5d73d5;hpb=d7501a96b72a4c0d2602230cf6cb7a17fa39b8fe diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index bbb0eca79..299d76645 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -12,6 +12,7 @@ package Header; use CGI(); +use HTML::Entities(); use Socket; use Time::Local; @@ -87,15 +88,6 @@ if ( -d "/var/ipfire/langs/${language}/" ) { }; }; -### Read IPFire Buildversion -$FIREBUILD = "File not found: firebuild\n"; -if (open(MYFile, "<${swroot}/firebuild")) { - $FIREBUILD = ; - chomp($FIREBUILD); - $FIREBUILD = "(Build: $FIREBUILD)"; - close(MYFile); -}; - require "${swroot}/langs/en.pl"; require "${swroot}/langs/${language}.pl"; eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`; @@ -148,23 +140,23 @@ sub genmenu { eval `/bin/cat /var/ipfire/menu.d/*.menu`; eval `/bin/cat /var/ipfire/menu.d/*.main`; - if (! blue_used() && ! orange_used()) { - $menu->{'05.firewall'}{'subMenu'}->{'40.dmz'}{'enabled'} = 0; - } if (! blue_used()) { - $menu->{'05.firewall'}{'subMenu'}->{'30.wireless'}{'enabled'} = 0; + $menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0; } if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) { $menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1; } + + if (&General::RedIsWireless()) { + $menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1; + } } sub showhttpheaders { - print "Pragma: no-cache\n"; - print "Cache-control: no-cache\n"; + print "Cache-control: private\n"; print "Connection: close\n"; - print "Content-type: text/html\n\n"; + print "Content-type: text/html; charset=UTF-8\n\n"; } sub is_menu_visible($) { @@ -302,16 +294,16 @@ sub IpInSubnet return (($ip >= $start) && ($ip <= $end)); } -sub cleanhtml -{ +sub escape($) { + my $s = shift; + return HTML::Entities::encode_entities($s); +} + +sub cleanhtml { my $outstring =$_[0]; $outstring =~ tr/,/ / if not defined $_[1] or $_[1] ne 'y'; - $outstring =~ s/&/&/g; - $outstring =~ s/\'/'/g; - $outstring =~ s/\"/"/g; #" This is just a workaround for the syntax highlighter - $outstring =~ s//>/g; - return $outstring; + + return escape($outstring); } sub connectionstatus