X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fcommon.pl;h=7f557fb435a2d5563730d33a251e98da5e763c96;hb=2c5603bb853ba7892d98c295e1f00641d7c13ef3;hp=b661c34dce81d89518607058db80bed521b11f32;hpb=fb4d2ffa6aae03b36e4db77be10c3d9dce4413f8;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index b661c34dc..7f557fb43 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -45,20 +45,27 @@ sub restore_form { sub build_std_url { $lxdebug->enter_sub(); - my $url = "$form->{script}?"; - my $first = 1; + my $script = $form->{script}; + + my @parts; + foreach my $key ((qw(login password), @_)) { next unless ($key); - $url .= "&" unless ($first); - $first = 0; - if ($key =~ /=/) { - $url .= $key; + if ($key =~ /(.*?)=(.*)/) { + if ($1 eq 'script') { + $script = $2; + } else { + push @parts, $key; + } + } else { - $url .= "${key}=" . E($form->{$key}); + push @parts, "${key}=" . E($form->{$key}); } } + my $url = "${script}?" . join('&', @parts); + $lxdebug->leave_sub(); return $url;