X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/eb1efd213a130776d9f2068437e7d6e21f54dec5..1d9947e012c0b95060e64beb0d752e64d2ba4d79:/SL/Controller/Base.pm diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index d9b1783ee..112a7bd8a 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -14,9 +14,9 @@ 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}";