From baca30758ef82ca53073ccb282bbea5436636628 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 23 Oct 2009 15:37:35 +0200 Subject: [PATCH] menuXML strict --- bin/mozilla/menuXML.pl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/menuXML.pl b/bin/mozilla/menuXML.pl index 1d9b0accc..5744c841f 100644 --- a/bin/mozilla/menuXML.pl +++ b/bin/mozilla/menuXML.pl @@ -36,19 +36,27 @@ # 2007-10-14 - XMLified - Holger Will ####################################################################### -$menufile = "menu.ini"; +my $menufile = "menu.ini"; use SL::Menu; use CGI::Carp qw(fatalsToBrowser); use Encode; use URI; + +use strict; + +my $locale; + 1; # end of main sub display { + my $form = $main::form; + my %myconfig = %main::myconfig; + $locale = Locale->new($myconfig{countrycode}, "menu"); - my $charset = $dbcharset || 'ISO-8859-1'; + my $charset = $main::dbcharset || 'ISO-8859-1'; my $callback = $form->unescape($form->{callback}); $callback = URI->new($callback)->rel($callback) if $callback; $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; @@ -89,7 +97,9 @@ sub display { sub acc_menu { - $mainlevel = $form->{level}; + my $form = $main::form; + + my $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; @@ -102,6 +112,9 @@ sub print_menu { my ($menu, $parent, $depth) = @_; my $html; + my $form = $main::form; + my %myconfig = %main::myconfig; + die if ($depth * 1 > 5); my @menuorder; -- 2.20.1