Revision 65df2ecc
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
SL/Menu.pm | ||
---|---|---|
63 | 63 |
|
64 | 64 |
my ($self, $myconfig, $form, $item) = @_; |
65 | 65 |
|
66 |
my $module = $form->{script}; |
|
67 |
my $action = "section_menu"; |
|
68 |
my $target = ""; |
|
66 |
my $module = $self->{$item}{module} || $form->{script};
|
|
67 |
my $action = $self->{$item}{action} || "section_menu";
|
|
68 |
my $target = $self->{$item}{target} || "";
|
|
69 | 69 |
|
70 |
if ($self->{$item}{module}) { |
|
71 |
$module = $self->{$item}{module}; |
|
72 |
} |
|
73 |
if ($self->{$item}{action}) { |
|
74 |
$action = $self->{$item}{action}; |
|
75 |
} |
|
76 |
if ($self->{$item}{target}) { |
|
77 |
$target = $self->{$item}{target}; |
|
78 |
} |
|
70 |
my $level = $form->escape($item); |
|
79 | 71 |
|
80 |
my $level = $form->escape($item); |
|
72 |
my $style = 'style="vertical-align:top"'; |
|
73 |
my $target_token = ($target) |
|
74 |
? "target='$target'" |
|
75 |
: ''; |
|
81 | 76 |
|
82 |
my $str = qq|<a style="vertical-align:top" href=$module?action=$action&level=$level|; |
|
77 |
# my $str = qq|<a style="vertical-align:top" href='|; |
|
78 |
my $href = ($self->{$item}{href}) |
|
79 |
? $form->escape($self->{$item}{href}) |
|
80 |
: "$module?action=$action&level=$level"; |
|
83 | 81 |
|
84 |
my @vars = qw(module action target href); |
|
82 |
my @vars = ($self->{$item}{href}) |
|
83 |
? qw(module target href) |
|
84 |
: qw(module action target href); |
|
85 | 85 |
|
86 |
if ($self->{$item}{href}) { |
|
87 |
$str = qq|<a href=$self->{$item}{href}|;
|
|
88 |
@vars = qw(module target href); |
|
89 |
} |
|
86 |
# if ($self->{$item}{href}) {
|
|
87 |
## $str = qq|<a 'href=$self->{$item}{href}|;
|
|
88 |
# @vars = qw(module target href);
|
|
89 |
# }
|
|
90 | 90 |
|
91 | 91 |
map { delete $self->{$item}{$_} } @vars; |
92 | 92 |
|
93 | 93 |
# add other params |
94 | 94 |
foreach my $key (keys %{ $self->{$item} }) { |
95 |
$str .= "&" . $form->escape($key, 1) . "=";
|
|
95 |
$href .= "&" . $form->escape($key, 1) . "=";
|
|
96 | 96 |
my ($value, $conf) = split(/=/, $self->{$item}{$key}, 2); |
97 | 97 |
$value = $myconfig->{$value} . "/$conf" if ($conf); |
98 |
$str .= $form->escape($value, 1);
|
|
98 |
$href .= $form->escape($value, 1);
|
|
99 | 99 |
} |
100 | 100 |
|
101 |
if ($target) { |
|
102 |
$str .= qq| target=$target|; |
|
103 |
} |
|
101 |
# $str .= q|'|; |
|
102 |
# |
|
103 |
# if ($target) { |
|
104 |
# $str .= qq| target=$target|; |
|
105 |
# } |
|
104 | 106 |
|
105 |
$str .= ">"; |
|
107 |
# $str .= ">"; |
|
108 |
|
|
109 |
my $str = "<a href='$href' $target_token $style>"; |
|
106 | 110 |
|
107 | 111 |
$main::lxdebug->leave_sub(); |
108 | 112 |
|
Auch abrufbar als: Unified diff
Einige strict Probleme mit vclimit=0