CustomerVendor: Umleitungs-URL mit url_for erzeugen
authorThomas Heck <theck@linet-services.de>
Mon, 15 Jul 2013 15:54:56 +0000 (17:54 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Thu, 18 Jul 2013 07:09:05 +0000 (09:09 +0200)
SL/Controller/CustomerVendor.pm

index e226775..b5afd02 100644 (file)
@@ -170,14 +170,15 @@ sub _transaction {
   my $name = $::form->escape($self->{cv}->name, 1);
   my $db = $self->is_vendor() ? 'vendor' : 'customer';
 
-  my $url =
-    $script .'?'.
-    'action=add&'.
-    'vc='. $db .'&'.
-    $db .'_id=' . $self->{cv}->id .'&'.
-    $db .'='. $name .'&'.
-    'type='. $::form->{type} .'&'.
-    'callback='. $callback;
+  my $url = $self->url_for(
+    controller => $script,
+    action     => 'add',
+    vc         => $db,
+    $db .'_id' => $self->{cv}->id,
+    $db        => $name,
+    type       => $::form->{type},
+    callback   => $callback,
+  );
 
   print $::form->redirect_header($url);
 }