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:
Leo-Andres Hofmann
2022-04-20 15:32:34 +02:00
committed by Peter Müller
parent a04b39daa7
commit c13060fd4c
6 changed files with 11 additions and 17 deletions

View File

@@ -46,7 +46,7 @@ my $menu = \%menuhash;
%settings = ();
%ethsettings = ();
%pppsettings = ();
@URI = ();
my @URI = split('\?', $ENV{'REQUEST_URI'});
### Make sure this is an SSL request
if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
@@ -573,3 +573,5 @@ sub get_manualpage_url() {
# No manual page configured, return nothing
return;
}
1; # End of package "Header"