X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/41400107ec8929d6ea107de7f5238006e9de029c..1d9947e012c0b95060e64beb0d752e64d2ba4d79:/SL/Controller/Base.pm?ds=inline diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index 06fd7fbdd..112a7bd8a 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -14,12 +14,12 @@ sub parse_html_template { sub url_for { my $self = shift; - return $_[0] if scalar(@_) == 1; + return $_[0] if (scalar(@_) == 1) && !ref($_[0]); - my %params = @_; + my %params = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_; my $controller = delete($params{controller}) || $self->_controller_name; my $action = delete($params{action}) || 'dispatch'; - $params{action} = "${controller}::${action}"; + $params{action} = "${controller}/${action}"; my $query = join('&', map { $::form->escape($_) . '=' . $::form->escape($params{$_}) } keys %params); return "controller.pl?${query}";