X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fcommon.pl;h=1bd92dc91c2a82ca2b8eef24fb2e48d8f901922c;hb=f8138d1721521673da949aeac440011dfe0a22c8;hp=42b6676533f4bb1730a4a30a965e61ca188749b3;hpb=dc3cd296e62eb09a16fa694d9b3a7158e4cf63bf;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 42b667653..1bd92dc91 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -91,7 +91,7 @@ sub select_part_internal { my ($new_item, $callback_sub); - my $re = "^new_.*_" . $form->{selection}; + my $re = "^new_.*_$form->{selection}\$"; foreach (grep /$re/, keys %{ $form }) { my $new_key = $_; @@ -139,7 +139,7 @@ sub part_selection_internal { } } - map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies click_button); + map { $form->{$_} = $options{$_} if ($options{$_}) } qw(no_services no_assemblies assemblies click_button); $parts = Common->retrieve_parts(\%myconfig, $form, $order_by, $order_dir); @@ -515,7 +515,15 @@ sub mark_as_paid_common { } else { my $referer = $ENV{HTTP_REFERER}; - $referer =~ s/^(.*)action\=.*\&(.*)$/$1action\=mark_as_paid\&mark_as_paid\=1\&id\=$form->{id}\&$2/; + if ($referer =~ /action/) { + $referer =~ /^(.*)\?action\=[^\&]*(\&.*)$/; + $script = $1; + $callback = $2; + } else { + $script = $referer; + $callback = ""; + } + $referer = $script . "?action=mark_as_paid&mark_as_paid=1&id=$form->{id}" . $callback; $form->header(); print qq|
|; print qq||.$locale->text('Mark as paid?').qq|
|;