CustomerVendor: redirect über Controller::redirect_to
authorThomas Heck <theck@linet-services.de>
Tue, 13 Aug 2013 13:15:46 +0000 (15:15 +0200)
committerThomas Heck <theck@linet-services.de>
Tue, 13 Aug 2013 13:15:46 +0000 (15:15 +0200)
SL/Controller/CustomerVendor.pm

index 1002a2e..4402694 100644 (file)
@@ -355,13 +355,17 @@ sub action_delete_shipto {
 sub action_search {
   my ($self) = @_;
 
-  my $url = 'ct.pl?action=search&db='. ($self->is_vendor() ? 'vendor' : 'customer');
+  my @url_params = (
+    controller => 'ct.pl',
+    action => 'search',
+    db => $self->is_vendor() ? 'vendor' : 'customer',
+  );
 
   if ( $::form->{callback} ) {
-    $url .= '&callback='. $::from->escape($::form->{callback});
+    push(@url_params, callback => $::form->{callback});
   }
 
-  print $::form->redirect_header($url);
+  $self->redirect_to(@url_params);
 }