X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fmenu.pl;h=a8b46973ac8d8e4e032fbb3637d544f57ee3fc87;hb=1c603341fc02e3a5a7b5126cd7df6478d2e34700;hp=976e27e794c20bd0f9c2f6a1313fa0c02db6c94d;hpb=8c7e44938a661e035f62840e1e177353240ace5d;p=kivitendo-erp.git diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 976e27e79..a8b46973a 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -38,6 +38,7 @@ $menufile = "menu.ini"; use SL::Menu; use Data::Dumper; +use URI; 1; @@ -48,6 +49,10 @@ $framesize = ($ENV{HTTP_USER_AGENT} =~ /links/i) ? "240" : "190"; sub display { $lxdebug->enter_sub(); + my $callback = $form->unescape($form->{callback}); + $callback = URI->new($callback)->rel($callback) if $callback; + $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; + $form->header; print qq| @@ -55,7 +60,7 @@ sub display { - + You need a browser that can read frames to see this page. @@ -115,9 +120,9 @@ sub section_menu { $label_icon = $label . ".gif"; $mlab = $label; $label = $locale->text($label); - + # multi line hack, sschoeling jul06 - # if a label is too long, try to split it at whitespaces, then join it to chunks of less + # if a label is too long, try to split it at whitespaces, then join it to chunks of less # than 20 chars and store it in an array. # use this array later instead of the &nbsp;-ed label @chunks = (); @@ -125,9 +130,10 @@ sub section_menu { map { if (($l += length $_) < 20) { $chunks[$i] .= " $_"; - } else { - $l = length $_; - $chunks[++$i] = $_; + } else { + $l = length $_; + $chunks[++$i] = $_; + } } split / /, $label; map { s/ /&nbsp;/ } @chunks;