X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenuv4.pl;h=e9e7ac499995ce14202071e1042a14ec7278385a;hb=72be9c763f3b7f7df1fae4fe10011e45f9e2ad1d;hp=0420fee3186be9a68a3501dd811b21b317b00b5f;hpb=45b3691bef2282b7894b4eb56b8b35368a475ced;p=kivitendo-erp.git
diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl
index 0420fee31..e9e7ac499 100644
--- a/bin/mozilla/menuv4.pl
+++ b/bin/mozilla/menuv4.pl
@@ -32,16 +32,19 @@
#
#######################################################################
-$menufile = "menu.ini";
use SL::Menu;
use URI;
+use strict;
+
1;
# end of main
sub display {
- $form->header(qq||);
+ my $form = $main::form;
+
+ $form->header(extra_code => qq||);
$form->{date} = clock_line();
$form->{menu} = acc_menu();
@@ -55,6 +58,8 @@ sub display {
}
sub clock_line {
+ my $form = $main::form;
+
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
= localtime(time);
@@ -77,11 +82,12 @@ sub clock_line {
}
sub acc_menu {
- $locale = Locale->new($myconfig{countrycode}, "menu");
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
- $mainlevel = $form->{level};
+ my $mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
- my $menu = new Menu "$menufile";
+ my $menu = Menu->new("menu.ini");
$| = 1;
@@ -90,6 +96,10 @@ sub acc_menu {
sub print_menu {
my ($menu, $parent, $depth) = @_;
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+
my $html;
die if ($depth * 1 > 5);
@@ -105,7 +115,7 @@ sub print_menu {
next if (($item eq "") || ($item =~ /--/));
my $menu_item = $menu->{"${parent}${item}"};
- my $menu_title = $locale->text($item);
+ my $menu_title = $::locale->text($item);
my $menu_text = $menu_title;
my $target = "main_window";