X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenuv4.pl;h=e9e7ac499995ce14202071e1042a14ec7278385a;hb=adf1b8cbb7c9b2b49e73256ea66c6fed00e8466e;hp=0ff4f4b00897a0b45121fd05c21e104986799d81;hpb=f20785168580f2d3587ebb2d06ade189246fd5f3;p=kivitendo-erp.git
diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl
index 0ff4f4b00..e9e7ac499 100644
--- a/bin/mozilla/menuv4.pl
+++ b/bin/mozilla/menuv4.pl
@@ -32,25 +32,25 @@
#
#######################################################################
-$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();
my $callback = $form->unescape($form->{callback});
- $main::lxdebug->message(0, ">>>>> $callback");
$callback = URI->new($callback)->rel($callback) if $callback;
- $main::lxdebug->message(0, ">>>>> $callback");
- $callback = "login.pl?action=company_logo" if $callback =~ /^(.\/)?$/;
- $main::lxdebug->message(0, ">>>>> $callback");
+ $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
$form->{callback} = $callback;
print $form->parse_html_template("menu/menuv4");
@@ -58,6 +58,8 @@ sub display {
}
sub clock_line {
+ my $form = $main::form;
+
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
= localtime(time);
@@ -80,11 +82,12 @@ sub clock_line {
}
sub acc_menu {
- $locale = Locale->new($language, "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;
@@ -93,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);
@@ -108,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";