From: Sven Schöling Date: Fri, 23 Oct 2009 13:37:35 +0000 (+0200) Subject: menuXML strict X-Git-Tag: release-2.6.1beta1~165 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=baca30758ef82ca53073ccb282bbea5436636628;p=kivitendo-erp.git menuXML strict --- 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;