From: Moritz Bunkus Date: Mon, 14 May 2007 11:55:32 +0000 (+0000) Subject: build_std_url() etwas aufgebohrt, sodass das auszuführende Script verändert werden... X-Git-Tag: release-2.4.3^2~323 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0c27df9b59417fcef923f18f6c33d6190dd94fa9;p=kivitendo-erp.git build_std_url() etwas aufgebohrt, sodass das auszuführende Script verändert werden kann. --- 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;