X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenuv4.pl;h=e9e7ac499995ce14202071e1042a14ec7278385a;hb=adf1b8cbb7c9b2b49e73256ea66c6fed00e8466e;hp=0980ff6c703b93bb9a70c59d7034c13a42150472;hpb=40255f36b6d4986caa11f5136a3d18857c2231a7;p=kivitendo-erp.git
diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl
index 0980ff6c7..e9e7ac499 100644
--- a/bin/mozilla/menuv4.pl
+++ b/bin/mozilla/menuv4.pl
@@ -32,25 +32,34 @@
#
#######################################################################
-$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();
- $form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
+ my $callback = $form->unescape($form->{callback});
+ $callback = URI->new($callback)->rel($callback) if $callback;
+ $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
+ $form->{callback} = $callback;
print $form->parse_html_template("menu/menuv4");
}
sub clock_line {
+ my $form = $main::form;
+
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
= localtime(time);
@@ -73,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;
@@ -86,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);
@@ -101,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";