From 62d7ed6effa438e4ede167f80fbfe8ca19bae0cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 30 Aug 2012 10:34:50 +0200 Subject: [PATCH] menuitem entfernt --- bin/mozilla/menu.pl | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 3f439db89..f6066e740 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -113,7 +113,19 @@ sub section_menu { $label = $::locale->text($label); - menuitem($menuitem); + $menuitem->{module} ||= $::form->{script}; + $menuitem->{action} ||= "section_menu"; + $menuitem->{target} ||= "main_window"; + $menuitem->{href} ||= "$item->{module}?action=$item->{action}"; + + # add other params + foreach my $key (keys %$item) { + next if $key =~ /target|module|action|href/; + $menuitem->{href} .= "&" . $::form->escape($key, 1) . "="; + my ($value, $conf) = split(/=/, $item->{$key}, 2); + $value = $::myconfig{$value} . "/$conf" if ($conf); + $item->{href} .= $::form->escape($value, 1); + } my $anchor = $menuitem->{href}; @@ -143,28 +155,6 @@ sub section_menu { return @items; } -sub menuitem { - my ($item, $name) = @_; - - $item->{module} ||= $::form->{script}; - $item->{action} ||= "section_menu"; - $item->{target} ||= "main_window"; - $item->{href} ||= "$item->{module}?action=$item->{action}"; - - # add other params - foreach my $key (keys %$item) { - next if $key =~ /target|module|action|href/; - $item->{href} .= "&" . $::form->escape($key, 1) . "="; - my ($value, $conf) = split(/=/, $item->{$key}, 2); - $value = $::myconfig{$value} . "/$conf" if ($conf); - $item->{href} .= $::form->escape($value, 1); - } - -# my $str = ""; -# -# return $str; -} - sub make_item { my %params = @_; $params{a} ||= ''; -- 2.20.1