mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 10:22:59 +02:00
menu: Fix warnings, clean code
This patch adds default values and removes a missing translation to fix "uninitialized value" and "odd number of elements" warnings. Removes function calls from functions.pl that have already been handled by the header before it is loaded by eval(). Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de> Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
a04b39daa7
commit
c13060fd4c
@@ -31,8 +31,6 @@
|
||||
# IPFire default theme. #
|
||||
###############################################################################
|
||||
|
||||
require "${General::swroot}/lang.pl";
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print menu html elements for submenu entries
|
||||
@@ -101,20 +99,15 @@ sub openpage {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
my $suppressMenu = shift;
|
||||
my $suppressMenu = shift // 0;
|
||||
my @tmp = split(/\./, basename($0));
|
||||
my $scriptName = @tmp[0];
|
||||
|
||||
@URI=split ('\?', $ENV{'REQUEST_URI'} );
|
||||
&General::readhash("${swroot}/main/settings", \%settings);
|
||||
&genmenu();
|
||||
|
||||
my $headline = "IPFire";
|
||||
if (($settings{'WINDOWWITHHOSTNAME'} eq 'on') || ($settings{'WINDOWWITHHOSTNAME'} eq '')) {
|
||||
$headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
|
||||
}
|
||||
|
||||
|
||||
print <<END;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -165,7 +158,10 @@ print <<END
|
||||
END
|
||||
;
|
||||
|
||||
&showmenu() if ($suppressMenu != 1);
|
||||
unless($suppressMenu) {
|
||||
&genmenu();
|
||||
&showmenu();
|
||||
}
|
||||
|
||||
print <<END
|
||||
<div class="bigbox fixed">
|
||||
@@ -270,5 +266,3 @@ sub openbox {
|
||||
sub closebox {
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user